title: Blocking IP automatically based on accessed files
body: <p>So I've got a Laravel-powered website that's just about launching, and I have an emailer set up that emails me whenever a 404 error is triggered on the site (as a phase-1 measure, to make sure no broken links are on the site).</p>
  
  <p>Recently I got a slew of emails reporting 404s for a number of URLs:</p>
  
  <ul>
  <li>/wordpress/wp-admin</li>
  <li>/wp-admin</li>
  <li>/wp-admin/images/wordpress-logo.png</li>
  <li>/manager/media/script/mootools/mootools.js</li>
  <li>/templates/system/style.css</li>
  <li>/modules/system/system.css</li>
  </ul>
  
  <p>All originating from the same remote IP, which I whoised to find that it belongs in Russia.</p>
  
  <p>Now, I know what this means: some hacker/bot is putting out feelers to try and guess what the site is built on, presumably to then make the appropriate attack.</p>
  
  <p>My question is, is it possible for me to automate the following process:</p>
  
  <ol>
  <li>Track the 404-URLs being pinged (which arguably is already being done)</li>
  <li>If a certain combination (e.g. the WP logo and the Joomla system CSS) URLs are being attempted, block this IP address.</li>
  </ol>
  
  <p>Further notes:</p>
  
  <ul>
  <li>my server is running Ubuntu (Apache)</li>
  <li>I have full sudo access</li>
  </ul>