Web Hosting Talk







View Full Version : hosts.deny file, need some help


Andrew Pakula
08-19-2001, 03:55 PM
I need to block an IP from my server who is constantly sending spam to my people with e-mail accounts on my server.

Do I just open up the hosts.deny file and add in the IP?

Say for example the IP is 212.105.32.240, do I just type that in on one line?

What if I wanted to block all IP's from:

212.105.x.x

How do I do that?

Avanti
08-19-2001, 06:10 PM
You should be able to block the IP sending you email through the RaQ gui.
Just go to the control panel and look at the email server parameters. There should be a field where you can enter the IP address of the spammer.

Cheers
Mark

huck
08-20-2001, 08:31 AM
Not all Programs use TCP Wrappers
TCP wrappers block access only to those programs running through inetd. By default, sendmail is not configured to run through inetd, so you cannot block access to it by using hosts.deny.

To check which services are ran through inetd, look into inetd.conf. While in inetd, you may want to comment out any services that you do not want, e.g. finger, ntalk, etc. You will then need to restart inetd using: /etc/rc.d/init.d/inet restart

POP before SMTP
I would encourage you to install the POP before SMTP patch for sendmail. This will require users to check their mail before sending mail. POP before SMTP works by acting as a dynamic filter -- when you check your mail, you open a window (usually 15 minutes) during which you can send email. If you have not checked your mail, then you cannot send email -- thus preventing users without an account on your machine from sending email.

jks
08-20-2001, 07:07 PM
As huck wrote, not all programs uses the hosts.deny file... but programs like ipfwadm/ipchains can be used to block the spammer anyways.

Using POP-B4-SMTP will not help him in his situation, as he writes that he is getting spam sent to account on the server. POP-B4-SMTP is very useful in other situations however, so I would also recommend installing it (if he haven't got it on already).

Andew, you could also consider using ORDB for blocking spam emails. My company sponsors ORDB - it greatly reduces the amount of spam you receive every week.