Tuesday, January 17, 2012

Restricting webserver access

Solution for restricting webserver access from the internet, but clients from local net
can work normal. Adding this to the .htaccess file from apache:

order deny,allow
allow from
allow from
deny from all
Satisfy Any
AuthName "Please login"
AuthType Basic
AuthUserFile /var/passwordfile
Require user username

This solution guarant access from clients with the ip ..10 and ..11 and
all other clients become a prompt for login.
In this way, i add all local clients to the list, and access with port-forwarding the server.
All other must know username and password.

No comments:

Post a Comment