Reputation: 7054
I am doing web development and running, say, Apache, just to test things locally on my machine. Say, I have a web application that allows one to view or edit many files on my computer. What should I do to make sure that nobody can access this server remotely?
Run the server under a dedicated account? Simply not set the root directory to "/"? Simply check the server's settings and make sure that only local IPs are allowed? Or is it already guaranteed by my router (if I am using Wifi at home)? What about using public Wifi?
Upvotes: 0
Views: 3038
Reputation: 722
You can just simply block any network traffic except loopback (localhost) on Apache port using firewall in your OS.
I simply block all traffic from any local network addresses, which are:
You should also take into consideration IPv6 addresses.
Another thing you can try is switching:
Order allow,deny
To:
Order deny,allow
In your site's settings file (I guess it will be sites-enabled/000-default).
Upvotes: 1