AWStats Security

Any of you guys who install AWStats may want to prevent other people from being able to see your own AWStats statistics page. It’s a good thing that AWStats has this feature built into it. You certainly wouldn’t want those google hackers to come up with a query that would let them find your AWStats page. Here’s how to set it up on Ubuntu:

Go to the /etc/awstats/ directory
cd /etc/awstats

In there you will find the config file for AWStats — awstats.conf

Open up awstats.conf with your favorite text editor
vi awstats.conf

Search for the line that says AllowAccessFromWebToFollowingIPAddresses=" ". On my version, it is on line 343. Insert in between the double quotes the IP addresses from which you would like to be able to access the AWStats page. If you wanted to be able to access the page from the computer that the web server is on (e.g. - 127.0.0.1) and also from another computer (e.g. - 24.30.146.223), then the line would look like this:
AllowAccessFromWebToFollowingIPAddresses="127.0.0.1 24.30.146.223"

That’s it! Save the file and you’re done. Now you’ve limited access to your AWStats page to only those computers whose IP addresses you’ve listed (this technique is still susceptible to IP address spoofing, but it’s better than nothing).

Tags: , , ,

Leave a Reply