Re: forward eth1 to eth0

Pontus Lidman (
Fri, 12 Mar 1999 10:32:11 +0100 (MET)

On Thu, 11 Mar 1999, Ryan Sweat wrote:

> I work for an ISP and we have decided to use linux as a temporary
> gateway for a few machines. We have installed 2 ethernet cards in this
> machine, and both work properly. I have eth0 connected to the internet,
> and eth1 goes into the hub, for the internal network. I can ping
> internally all machines, but packets do not get forwarded to eth0 (the
> internet.) I am running 2.0.36 kernel right now, but i am upgrading to
> 2.2 as we speak. I know this is a routing problem, getting packets from
> eth1 to forward to eth0 and out to the net, but i cannot figure it out
> for the life of me. I have used IP masquerading with no problem, but we
> need real routable IP's. Any help would be appreciated, thank you.

You only need to enable ip forwarding in the kernel (and recompile it of
course). Then you should set the IP of the gateway machine as default
gateway for the machines on the internal network, and it should work fine.
I assume you have the internet reachable from the gateway machine already,
and that the next hop router knows your gateway can route to the internal

Pontus Lidman,, Development & support manager
Scene: | MUD: 6969 | irc:
>>Those who do not understand Unix are condemned to reinvent it, poorly.<<
     All standard disclaimers apply. ---  Void where prohibited.

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