Skip to content

MacOS Loopback Address Whitelisting #16

@Z-Kris

Description

@Z-Kris

MacOS by default only whitelists the 127.0.0.1 loopback address. This is a problem as we use loopback addresses in the range of 127.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:

  1. Launch the HTTP server when the proxy tool boots up.
  2. If the operating system is MacOS, attempt to ping the HTTP server on. If the ping is successful, do nothing - the addresses have been whitelisted. If it isn't successful, go to step 3.
  3. Launch a modal window asking the user for the sudo password, with an explanation for why this is necessary.
  4. Once the sudo password has been acquired, run the script with sudo privileges, whitelisting all the loopback addresses that we'll need.
  5. Restart the HTTP server - it is unclear whether this is necessary, but it probably is.

The command to whitelist a loopback address is sudo ifconfig lo0 alias 127.x.x.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions