-   Linux - Security (
-   -   iptables rule help (

the_gripmaster 05-15-2007 03:16 AM

iptables rule help
We have several networks such as:

Our mail server has IP address

Now we only want to allow to access port 25 of, and no other network.

What would be the rule (in iptables syntax)?

The mail server currently has no firewall rules.

Samotnik 05-15-2007 05:48 AM

man iptables!

billymayday 05-15-2007 06:13 AM

That's a bit tough - as far as manuals go, iptables is hard to get.

Have a look at

win32sux 05-15-2007 07:19 AM

if the rule is to be run on the mail server itself, it would be like:

iptables -A INPUT -p TCP -s --dport 25 -j ACCEPT
this assumes a policy of DROP, of course...

if your policy is ACCEPT for some reason, then just tweak it like:

iptables -A INPUT -p TCP -s ! --dport 25 -j DROP

All times are GMT -5. The time now is 04:02 PM.