Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Feb 27, 2005 1:23 pm 
Offline
Junior Member
User avatar

Joined: Wed Aug 13, 2003 1:25 pm
Posts: 27
Hi,

I am running exim on my lindoe and I am seeing a lot of spammer trying to send emails to non-existing address; and some are trying to send many emails at a time.

I am wondering, in general, is there any way that I can automatically block such bad IP's SMTP connections from iptables? Ie: automatically create an iptable rule on the mail port when XX amounts of bad connections on exim are found.

Thanks for help.

Kevin


Top
   
 Post subject:
PostPosted: Sun Feb 27, 2005 4:54 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Yes, you can. Google for "iptables automatic rules" and variants, and you'll turn up scripts that you can use or adapt.

As a side note, are you already using a DNS Blacklist? If not, start: it will help a lot with this kind of stuff, possibly to the point where you don't feel the need for your own. Spamhaus (www.spamhaus.org) runs a good one, but there are dozens.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
 Post subject:
PostPosted: Sun Feb 27, 2005 5:52 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
spamhaus.org and spamcop.net together take care of 90% of this crap.

I stop a lot of the rest by rejecting connections from IP addresses for which I cannot successful lookup the host name. You have to whitelist this if you have legitimate senders who cannot / will not set up their mail systems correctly.

Auto written firewall rules can leave you vulnerable to a DoS attack using forged IP headers unless the 'rules for writing the rules' are chosen very carefully.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Sun Feb 27, 2005 11:17 pm 
Offline
Junior Member
User avatar

Joined: Wed Aug 13, 2003 1:25 pm
Posts: 27
Thanks for all the suggestions... and yes, I am already using multiple DNS blacklists on my linode. Even with the blacklist, I still see a lot of connection trying to send email to non-existing account. I've already have setting to bounce all those emails, but just want to see if there is any easy way to drop those connection on the iptables layer as well.

Thanks,
Kevin


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group