Re: IPTABLES MASQUERADE - WAN is OK but no LAN traffic...



Hello,

Robert a écrit :
On Mon, 28 Aug 2006 23:26:11 -0700, wisptech wrote:

iptables -t nat -A POSTROUTING -s 172.19.0.0/24 -j SNAT --to
66.119.9.186

Since POSTROUTING is done on all FORWARD'ed packets every packet no matter
where is started,

This is not completely true, as most packets don't traverse the nat chains. Only the first packet of a connexion does. The next ones are implicitly processed by the NAT code.

when it exits the box it is being SNAT'ed to 66.119.9.186

This is true only for packets in the original direction of the connection, not for packets in the return direction.

Can someone tell me what the heck I'm doing wrong?

You didn't describe your network setup. So the reader doesn't know what the 66.119.9.186 or 172.19.0.0/24 addresses mean. You didn't clearly say what is your goal either.
.



Relevant Pages

  • Strange routing blocked by ZAP
    ... The packets are routed every 63 minutes. ... The packets are always from port 0 to port 0. ... The first packet is generated immediately after connecting to the 'net. ... client installed (Not even Microsoft Networks) ...
    (comp.security.firewalls)
  • Strange routing blocked by ZAP
    ... The packets are routed every 63 minutes. ... The packets are always from port 0 to port 0. ... The first packet is generated immediately after connecting to the 'net. ... client installed (Not even Microsoft Networks) ...
    (comp.security.firewalls)
  • Re: basic question in TCP connection
    ... > I am having a basic question in networking? ... > I read that TCP connection will have a virtual cicuit ... > only the first packet will contain destination ip and the ... > remaining packets will follow the path ...
    (comp.os.linux.misc)
  • Re: basic question in TCP connection
    ... > I am having a basic question in networking? ... > I read that TCP connection will have a virtual cicuit ... > only the first packet will contain destination ip and the ... > remaining packets will follow the path ...
    (comp.os.linux)
  • basic question in TCP connection
    ... I am having a basic question in networking? ... only the first packet will contain destination ip and the ... remaining packets will follow the path ... and how the second packet will ...
    (comp.os.linux.misc)