Help - Search - Members - Calendar
Full Version: Stop inbound mail...
The Planet Forums > Control Panels > cPanel/WHM
Santinelli
Hey folks - Wondering if someone can help me. I had a domain on it's own ip address receiving THOUSANDS and THOUSANDS of spam emails. It is causing terrible problems to my server and to other users.

I would like to set this domain so that it will not accept any inbound email traffic, but can't seem to find out how with IPtables.

Does anyone know how to do this via iptables OR Cpanel?

Thanks for the help, I greatly appreciate it!


Steve
Santinelli
So... I've read and read about iptables...

Does anyone know how I can setup iptables so that a certain ip address would drop ALL inbound packets coming in for email?

Anyone?

Thanks!


Steve
SarcNBit
iptables -A INPUT -d --dport 25 -p tcp -j DROP
Santinelli
QUOTE
Originally posted by SarcNBit
iptables -A INPUT -d --dport 25 -p tcp -j DROP



Thanks - So far the :fail: no address has been working at keeping the load down to next to nothing... Exim is still failing a couple of times a day, but at least the cpu usage is down from 90%!!!


Steve
SarcNBit
Just in case you aren't aware, :blackhole: is to :fail: as iptables DROP is to REJECT. In case you are not that familiar with iptables or don't feel like revisiting the SAT exams. :fail: will create an acknowledgement (NDR) of the incoming mail. :blackhole: will drop incoming mail without acknowledgement.
Santinelli
QUOTE
Originally posted by SarcNBit
Just in case you aren't aware, :blackhole: is to :fail: as iptables DROP is to REJECT. In case you are not that familiar with iptables or don't feel like revisiting the SAT exams. :fail: will create an acknowledgement (NDR) of the incoming mail. :blackhole: will drop incoming mail without acknowledgement.


Actually, I've been using the exim hack ":fail: no address here". I had the :blackhole: before and it wasn't able to deal with the ton of email that was coming in. I put in the exim piece aussie created, and setup the accounts with the above fail, and the server is running great now...


Steve
SarcNBit
QUOTE
Originally posted by Santinelli
...I put in the exim piece aussie created...


Would you mind providing a link? I am not familiar with this solution.
Santinelli
QUOTE
Originally posted by SarcNBit
Would you mind providing a link? I am not familiar with this solution.


Part of the information is here: http://forum.ev1servers.net/showthread.php...ht=fail+address

And another pointer in that message to here: http://forum.ev1servers.net/showthread.php...&threadid=35346

Hope that helps, so far it is working for me!

Steve
SarcNBit
Thank you for the pointer.
LighthousePoint
In DNS, get rid of the MX record, as well. That'll prevent most mail traffic from even getting to your box.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.