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

Re: Internal Routing for NAT



On Tue, Jul 30, 2002 at 04:15:55PM -0700, Ryan White did this all over the keyboard:
> 
> 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?

In this case you would have to use the FORWARD chain, because after
natting to the abve address you have to route the packets out of your
box. This requires an apropriet routing entry.

WD

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GPA/CS dx s-:- a-- C++$ UL/S+++>++++ P++>+++ L+++(++++)$ !E W+ N- o?
K? !w 0? !M V- PS++(---) !PE Y+ PGP++ t-- !5 X+ R- !tv b+(++) DI++
D+++ G e+ h-- r y?
------END GEEK CODE BLOCK------

Attachment: pgpkxHEwGV4yG.pgp
Description: PGP signature


Reply to: