Answer the question
In order to leave comments, you need to log in
Iptables, exim, mail from only one IP?
How can I use iptables or configure Exim to make my mail server receive mail from only one/several specific hosts?
Those. I want mail to reach the mail server only from IP: 22.33.44.55 and 66.77.88.99 and from no other.
OS:
####@###:/# uname -a<br/>
Linux ######## 2.4.16 #25 Чтв Авг 1 13:29:04 SAMST 2002 i686 unknown<br/>
Answer the question
In order to leave comments, you need to log in
and in iptables something like this:
/sbin/iptables -A INPUT -p tcp -m tcp -s 0.0.0.0/0 -i interface --dport 25 -j DROP
/sbin/iptables -A OUTPUT -p tcp -m tcp -d 0.0.0.0/0 -o interface --sport 25 -j DROP
/sbin/iptables -A INPUT -p tcp -m tcp -s 22.33.44.55/32 -i interface --dport 25 -j ACCEPT
/sbin/iptables -A OUTPUT -p tcp -m tcp -d 22.33.44.55/32 -o interface --sport 25 -j ACCEPT
/sbin/iptables -A INPUT -p tcp -m tcp -s 66.77.88.99/32 -i interface --dport 25 -j ACCEPT
/sbin/iptables -A OUTPUT -p tcp -m tcp -d 66.77.88.99/32 -o interface --sport 25 -j ACCEPT
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question