Solved

WHM / Cpanel Spam

Posted on 2016-10-12
3
29 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

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 35

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

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

626 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