Mail Server Behind IPTABLES

Alistair Tonner Alistair at
Wed Sep 1 16:50:44 CEST 2004

On August 31, 2004 09:01 pm, Ajen Diwakar wrote:
> Hi All
> I am new to IPTABLES usage. I have linux(RH) 9.0.
> The external IP address eth1 is 202.62.x.x
> The internal ip address is
> My mail server IP address is
> How do I setup my iptables so that the mail to my record get transfred
> to the mail server.
> Any assistance will be appreciated.

	iptables -t nat -A PREROUTING -p TCP -i {internet device} -d 202.62.x.x  \ 
--dport 25 -j DNAT -to

	iptables -A FORWARD -p TCP -i {internet device} -d --dport 25  \

	(assuming FORWARD -P DROP )

	Alistair Tonner

More information about the netfilter mailing list