Solved

WHM / Cpanel Spam

Posted on 2016-10-12
3
23 Views
Last Modified: 2016-11-01
Hi,

Some sneaky bugger is bypassing my mx records and delivery spam direct to my hosting server.

My mx points to a spam filtering company and they then pass the good mail to me these spam emails are coming direct to the server.

My question is can I set whm to only allow incoming mail from certain IP addresses ?

Thank Simon
0
Comment
Question by:pc-buddy
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points (awarded by participants)
ID: 41841898
Yes if there are only a few allowed incoming addresses you can use iptables Something like
iptables -A INPUT -p tcp -s <good_address_1> --syn --dport 25 -J ACCEPT
iptables -A INPUT -p tcp -s <good_address_2> --syn --dport 25 -J ACCEPT
# (more of these)
iptables -A INPUT -p tcp --syn --dport 25 -J DROP

Open in new window

Run these rules on the server system(s). Specify adresses numerically (aaa.bbb.ccc.ddd). See man iptables, man iptables-extensions. Install the iptables package if you don't already have it.
0
 

Author Comment

by:pc-buddy
ID: 41841906
Awesome will try it, thanks Duncan
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 41868074
The author last posted that he would try the solution.
He has not posted since, so it seems entirely reasonable to assume that it worked for him.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question