Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Countering mail spam at the iptables level?

Discussion in 'E-mail Discussion' started by quanin, Dec 2, 2011.

  1. quanin

    quanin Well-Known Member

    Joined:
    Aug 18, 2011
    Messages:
    88
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    We recently took on a couple of accounts that seem to have brought with them a lot of unwanted spammer attention. That's resulted in a pretty significant increase in mail trafick to the server, most of it not very helpful. I'm wondering if there's a halfway decent means, either within CPanel or that will work with CPanel, to have a certain number of rejected messages trigger a temporary block at the firewall level. I've done some digging on this and haven't found anything myself, but that doesn't necessarily mean there's nothing to find. I currently use configserver firewall, and while it does a decent job with everything else, it doesn't appear to support what I'm looking to do. If anyone's got a suggestion or two, that'd be appreciated. Thanks a lot for the help.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You could simply have any IPs that hit the machine over a set number for port 25 will be blocked either permanently or temporarily. There's a discussion for doing this via iptables for port number 22 (SSH) at this location:

    Block brute force attacks with iptables

    This basically blocks any IPs that are hitting the machine 8 or more times in 60 seconds or less. You could do something similar for possibly IPs hitting the machine in 30 seconds or less 5 or more times on port 25. You'd simply have to revise the rules mentioned in the guide.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. quanin

    quanin Well-Known Member

    Joined:
    Aug 18, 2011
    Messages:
    88
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    I may be able to make use of something like this in CSF itself. I'll investigate. Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice