Restricting access to parts of your site

      No Comments on Restricting access to parts of your site

The easiest way to further secure parts of your site is by blocking access to it by default. This way only you can log on to the admin section of your site. This way your site is a little bit more hardened. I will show you how this works.

This is a rather simple technique that makes it a little bit safer to have your website on the worldwide web. All we have to do is blocking access to certain parts of your site. We can then use a whitelist of IP address’s that are allowed access to these parts. Don’t use this as your only defense though! Always make sure you use a strong password as well.

To block all incoming traffic to a folder you can use the following in a web.config file. Adjust the IP address to match your own. Add more IP’s if needed, but always make sure to clean out the whitelist of ‘old’ and un-used addresses.