For various reasons over the past year or so I have been wondering what is the best way to block access to my server. I have used .htaccess files in the past, but they have two drawbacks. First, they have to be processed by apache everytime someone requests a page. Second, they have to be set up for every domain. It would be much more efficient to drop traffic before it even gets to apache.
That is what the iptables command does, and I think I finally got it figured out.