Protect Glype admin.php by Restricting Access Based on IP

Posted by Vectro 12 August 2012

One trick to secure Glype is by restricting access to the admin.php file. It is possible to use a small amount of .htaccess code to restrict access based on the visitor’s IP address. This would only allow certain machines or networks to access the log-in screen for the admin area. Any unauthorized users will see a 403 ‘Forbidden’ error code from the web server.

Paste the following code at or near the top of the .htaccess file in the root of your Glype installation, preferably before any major ‘allow’ rules:


<Files admin.php>
order deny,allow
allow from 1.2.3.4
allow from 5.6.7.8
deny from all
</Files>

Replace 1.2.3.4 with the first IP you want to allow. Replace 5.6.7.8 with the next one. You can create more ‘allow from’ lines depending on how many addresses you need to allow. You can also remove the second line and only leave 1 if you only need to allow a single address.

If you are not sure what your own IP address is, you can visit cmyip.com on the web and it will be displayed.

Sorry, comments are closed.

Previous Post
«
Next Post
»