March 27th, 2004, 12:55 AM
Help with IP Masquerading (understanding)
I configured IP Masquerading for between my linux and win98 machine. Installed linux last night.
But I don't understand how when the client Win98 requests a web site, and the host (linux) recieves the page, how does it know to forward it on to 192.168.0.162 the client?
I have read the Linux IP Masquerade HOWTO
2.5. How does IP Masquerade Work?
But that only realy explains how it is set up, not how the host or gateway computer knows who the data recieved was for.
Anyone know an article that can explain this?
March 27th, 2004, 01:03 AM
When a packet comes back from the destination computer, the router checks the destination address on the packet. It then looks in the address translation table to see which computer on the stub domain the packet belongs to. It changes the destination address to the one saved in the address translation table and sends it to that computer. If it doesn't find a match in the table, it drops the packet.
Found by doing a Google Search on "Network Address Translation". It is the first result.
March 27th, 2004, 01:09 AM
This make much more sence and I havent completed reading it yet. But thank you very much.
Never understood what NAT was or that it had anything to do with ip masquerading. Thanks for this.
March 27th, 2004, 01:32 AM
.5. How does IP Masquerade Work?
# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Hope this helps, Computernerd22
March 27th, 2004, 05:21 AM
journy101 > You are very welcome.
Computernerd22 > I believe he was questioning about the actual structure of how the masquerading worked. From his post, it looked like he already had it set up and was just wondering 'what' was happening.
April 19th, 2004, 01:47 PM
as i was understood, the machine detects for which cleint was the response by adding special header to the outgoing packets, so when it comes back the compre it with the stored header and forward the packet to the right client.
Beware of security guys!