title: Blocking access to site by banned IP addresses
body: <p>I have a list of IP addresses of bots/hackers that are constantly attacking one of my sites. I want to block these visitors by IP and am trying to work out a "best" approach for this. My site uses C# ASP.NET MVC.</p>
  
  <p>I have a <code>List&lt;int&gt;</code> of IP's.</p>
  
  <p>Where is the best place to put the check code? I'm thinking of using the Page_Load event of a master page but could also put it in a filter to each controller...</p>
  
  <p>What HTML do you return to the banned IP? I am reluctant to return a "site blocked because your IP is banned" because this will give the hackers the information they need to work around the block. The advantage of doing this is that it will give the innocent users who have been caught in the crossfire the reason why they can't access the site. My current feeling is that I should return a "Site under maintenance" notice.</p>
  
  <p>What HTTP status code should I return with a fake "Site under maintenance" notice? I'm thinking 200.</p>
  
  <p>Site is running on Server 2003.</p>