Redirect Command

Vernon A. Fort vfort at
Thu Apr 21 15:58:21 CEST 2005

Hernan Arredondo wrote:

>Hi all,
>I'm new with iptables, I trying to create a rule that redirect all the
>packets that goes to the port 25 of my firewall to the port 25 in a
>Internet LAN machine, then I execute the command:
>/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25 -j DNAT
>eth0 is the host exposed directly to Internet, and is the
>host in the LAN.
You should also have a FORWARD rule:
    /sbin/iptables -A FORWARD -p tcp -d --dport 25 -j ACCEPT


More information about the netfilter mailing list