Re: mail relay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



david@xxxxxx wrote:


Hi everybody,
I would like to know how can I filter the mail relay received in my port 25 with the firewall,.. I want only accept the packets from only one ip, my ISP.
This is possible this rule with iptables ??


If your mailserver is on the firewall itself, you should give this one a try (this is very
basic, one would usually add some more rules, set default policy to drop, then even
this rule wouldn't be right anymore):


iptables -A INPUT -p tcp --dport 25 -s ! 1.2.3.4 -j REJECT --reject-with tcp-reset


Sven





[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux