Shu Xiao wrote:

> I want to set my Linux machine as a IP forwarding node, which
> forward the package from the internal node(with viutual address
> 192.168.2.x) to the outside real IP address. Please advise me how to do it.
> Of course I have installed two ethernet cards in  my Linux machine.
> I can ping from the internal node to the outside ethernet card's IP address
> of the Linux gateway, but I failed to reach the real outside IP from the
> internal nodes.

You have to use IP masquerading. See the IP-Masquerade mini-howto for
more details, along with the ipfw(4) and either ipfwadm(8) or
ipchains(8) manpages.

> Also I have a puzzle, since the virtual address is not used in the Internet.
> How can the internal node get response from the outside node it is pinging?

If you use IP masquerading, the router will modify the IP header so
that the packet appears to come from the router itself. It will then
recognise and de-masquerade any replies.

-- 
Glynn Clements <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to