Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-12-2009, 03:30 PM   #1
LQ Newbie
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Block all incoming mail traffic except certain addresses

hi folks,
can you please assist me in using the iptables firewall to block all incoming mail traffic (SMTP port 25) except that of a certain IP(s)? the situation is that we have a server that we only want to receive mail from a particular sender.

jenny z.
Old 01-13-2009, 07:35 AM   #2
Registered: Aug 2008
Location: Northern Hemisphere
Distribution: Slackware, OpenVMS, fbsd
Posts: 51

Rep: Reputation: 16
iptables -A INPUT -m tcp -p tcp --dport 25 -s -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 25 -s -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 25 -s -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 25 -j REJECT
change 1.2.3.x to the ip(s) that you want to allow.

keep in mind that this will append to your already existing
INPUT chain and can be negated by the rules above it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incoming traffic prioritize dorian33 Linux - Networking 8 10-26-2008 06:44 AM
Sendmail: how to reject incoming spam spoofed from internal addresses krasl Linux - Server 2 03-17-2008 11:47 AM
monitoring the incoming traffic narendra.pant Linux - Networking 1 08-11-2006 05:21 PM
Allow Incoming Traffic clarence1720 Mandriva 15 12-07-2004 12:26 AM
deleted user accont in sendmail how do i block incoming mail slack66 Linux - Security 2 11-18-2003 02:16 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration