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

Re: Internal Routing for NAT



|Hi. I have a NAT setup and working fine using the following settings.
|
|        $IPTABLES -I PREROUTING  -p tcp -t nat -d 1.2.3.4 --dport 25 -j
|DNAT --to 172.16.1.4:25
|        $IPTABLES -A INPUT -i eth0 -d 1.2.3.4 -p tcp --dport 25 -j ACCEPT
|
|For some reason when I connect from the local router the connections are
|not being nated. They end up routing to the local machine on port 25.
|What can I do to fix this?

Hi Ryan,

In your firewall rules should have a line like this:

$IPTABLES -A POSTROUTING -t nat -o eth1 -j SNAT --to X.Y.Z.W

Just remove -o eth1 or -o eth0 or whatever, and load these rules again.
Here I do this and worked fine.

Regards,
Henrique


-- 
Henrique Pedroni Neto
Administrador de Rede - ITAL (http://www.ital.org.br)
E-mail: henrique@ital.org.br
UIN: 8146255
Dúvidas sobre Debian? Visite o Rau-Tu: http://rautu.cipsga.org.br
"One foot to rule them all" - GNOME

Attachment: pgp7jlxJBqM5I.pgp
Description: PGP signature


Reply to: