June 03, 2003

Blocking the goof-ball

The goof-ball should not be a problem any longer. I took it upon myself to add a few Deny statements to my httpd.conf file and a DISCARD statement to my /etc/mail/access file. We won't be hearing anything from that person any time soon.

Basically, I made it so that they can neither send mail to the listserv nor access the listserv web page interface. This is done in two places.

For the email blocking, a simple one line addition was necessary. Let's say that you wanted to have all email from "goof-ball@goofy.org" just discarded when it arrived. All you have to do is edit your /etc/mail/access file and add the following line:

goof-ball@goofy.org DISCARD

You can add lines that will handle whole domains if you like as well. I'll leave it to you to figure out how to do that. Make sure that you perform a "make" in /etc/mail after your done editing the file in order for the access.db file to be generated. I'm not sure whether or not you have to restart sendmail after you make an update to access.db, but I do it any way just to make sure.

Now, the web interface Deny statements are a little more tricky. For these, I had to get the IP address or IP address range for goof-ball and add some Deny statements to the entries.

In /etc/httpd/conf/httpd.conf you find entries that say:


Order allow, deny
Allow from all

Now all you have to do is add:

Deny from 11.22.33.44

if you want to deny a particular IP address from viewing that particular directory. You can deny access to whole subnets by leaving of one, two, or three of the following octets. You can also deny access by DNS name, if you have DNS lookups enabled on your web server.

You will have to restart your web server after making these entries. Make sure that you add the Deny statement to all applicable entries.

That's it for now,

Jeff

Posted by Jeff at June 3, 2003 10:20 AM
Comments