dneuge / legacy-status-proxy-vatsim

Proxy server for making status/datafiles available to passive clients in legacy formats
MIT License
3 stars 0 forks source link

listen only on loopback if restricted to localhost #6

Open dneuge opened 3 years ago

dneuge commented 3 years ago

To improve security, installations which only allow access by host-local IPs should by default be restricted to loopback interface.

There should be an option to bind to all interfaces. When disabling that option, user should be asked for confirmation if any remote IPs have been listed. When adding a remote IP user should be asked if option should be automatically enabled. Changing the option will require a server restart.

On config migration check previous IP list and set default accordingly.

dneuge commented 3 years ago

This turns out to be a bit more difficult to handle:

While most users probably should be fine with just 127.0.0.1 it seems that it cannot be implemented easily without causing confusion for some users. Implementing it only for new users (blank configuration) could be an option but it might still confuse users who simply reset their configuration.

When introducing a restriction to loopback addresses it may be best to notify users with a dialog on first start to inform them and interactively ask for a decision to either keep the old behaviour or confirm to restrict access. A silent migration probably would only cause trouble.

The current whitelisting approach means the only attack vector would be a critical error in Apache HTTP Core before the whitelisting can deny access. As the proxy only reformats public data from fixed addresses there currently appears to be no risk for any information leak (unless an error in HC would open up access that is not provided otherwise). This temporary tool's user base is a rather closed community whose majority can be easily notified in case of any issues. Thus, spending the extra time needed to implement a solution as described above seems out of proportion.