-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS Loopback Address Whitelisting #16
Comments
Probably just providing a script to run would work. I think if someone is messing with rsprox they will know how to run a script. Add a line to the setup instructions for mac users. BTW thanks for the post, this got my rsprox working. |
I came up with a script that registers all the possible aliases, but in my limited testing it made the general networking of my machine super slow and also doesn't persist across reboots which is far from ideal. |
Can you provide this script? |
#!/bin/bash
# Loop for the range 127.1.x.2 where x is 44..255
for ((x=44; x<=255; x++))
do
sudo ifconfig lo0 alias 127.1.$x.2
done
# Loop for the range 127.2.x.2 where x is 0..88
for ((x=0; x<=88; x++))
do
sudo ifconfig lo0 alias 127.2.$x.2
done
echo "Alias IPs have been added to lo0 interface." |
Some additional context:
Ideally, you'd only address the current world's IP, as well as the one you're hopping to, but since this requires sudo it likely would lead to loads of disconnects if the rsprox constantly either has to ask or if the alias command / network stack is too slow to execute. Alternatively, you could inject a custom RuneLite plugin that tracks the current/new world from the client, and that transmits this to rsprot over a socket. That way, you could (in theory) handle most of this using either one or two fixed ip's. In either case, here's my "disable aliases" script to restore the network stack, which compliments @notmeta's script above that enables said aliases: #!/bin/bash
# Loop for the range 127.1.x.2 where x is 44..255
for ((x=44; x<=255; x++))
do
sudo ifconfig lo0 -alias 127.1.$x.2
done
# Loop for the range 127.2.x.2 where x is 0..88
for ((x=0; x<=88; x++))
do
sudo ifconfig lo0 -alias 127.2.$x.2
done
echo "Alias IPs have been removed from lo0 interface." |
MacOS by default only whitelists the
127.0.0.1
loopback address. This is a problem as we use loopback addresses in the range of127.x.x.2
for the proxy tool, with one IP corresponding to one game world.Without whitelisting these addresses, the clients will be unable to communicate with the proxy tool after being patched, rendering the entire process non-functional.
In order to remedy this problem, we need to write a script that can whitelist all the loopback addresses from world 301 up to around 600 - effectively every world that exists in Old School RuneScape. Because this process is only done once (until a reboot occurs), we need to secure all the existing worlds and give some headroom for new worlds that might be added as well.
The problem with whitelisting these loopback addresses is that they require
sudo
privileges - this is likely not something the proxy tool will have. The current best plan forward is to do these steps:sudo
password, with an explanation for why this is necessary.sudo
password has been acquired, run the script withsudo
privileges, whitelisting all the loopback addresses that we'll need.The command to whitelist a loopback address is
sudo ifconfig lo0 alias 127.x.x.2
.The text was updated successfully, but these errors were encountered: