Andrew Pakula
08-19-2001, 03:56 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?
SI-Chris
08-19-2001, 04:03 PM
hosts.deny won't block an IP number from sending mail to your server, hosts.deny only blocks IP numbers from accessing inet services (like POP, FTP and telnet). If you want to block e-mail from being sent to people on the server, you'll have to use something like ProcMail (http://www.procmail.org).
Also blocking the IP on the router will stop the IP from doing anything on the sever.
madsere
08-19-2001, 04:34 PM
Yes, you just open the file and enter the offending IP address. Some implementations allow different address ranges such as
123.123.
or
123.123.0.0/32
or
123.123.0.0/255.255.0.0
which all does the same, blocking all addresses starting with 123.123...
I don't think putting his IP address in hosts.deny would prevent his SMTP server from connecting to yours - that's not how it usually works.
Anyway, how hosts.allow works in details depends somewhat on which Operating System you're using - even which Unix implementation. Generally you should be able to learn everything about your particular hosts.allow by doing
$ man hosts.allow
on your system.
remarkable
08-19-2001, 05:06 PM
hosts.all/deny will not help with sendmail unless you are running it with inetd.. I suggest using sendmail built in Anti-Spam features.
http://www.sendmail.org/m4/anti-spam.html