Understanding how nat works

Aleksandar Milivojevic amilivojevic at pbl.ca
Tue Sep 21 16:47:56 CEST 2004


Dominic Iadicicco wrote:
> Hello all,
> 
> I am new at iptables and am tring to learn for furture
> projects. For an expirement I tried this.
> 
> "iptables -t nat -A POSTROUTING -s 172.16.12.131 -o
> eth0 -j SNAT --to 172.16.12.167"
> 
> This is all on a 172.16.12.x subnet.
> 
> from the same machine I then tried to ping
> 172.16.12.200 and I got nowhere.  When I deleted the
> rule it worked fine.  

What machine has 172.16.12.167?  Usually you should SNAT only to address 
that is assigned to the machine/interface where you SNATing.

-- 
Aleksandar Milivojevic <amilivojevic at pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7



More information about the netfilter mailing list