Solved

WHM / Cpanel Spam

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
video edge NVR Device Discovery Problem 4 47
is my large folder zipped corrupted 4 67
VMware Workstation 12 Player 16 76
How code a 301 redirect for folder files -> 1 file 2 41
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

832 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