Solved

WHM / Cpanel Spam

Posted on 2016-10-12
3
16 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now