Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

WHM / Cpanel Spam

Posted on 2016-10-12
3
Medium Priority
?
41 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 35

Accepted Solution

by:
Duncan Roe earned 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

972 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