[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting up masquerading (not sure where the problem is happening)

On Mon, Sep 09, 2002 at 09:52:47AM -0700, Gary Lucas wrote:
> Hmm, ok...
> I have never had problems getting the box connected to my ISP,  I am haveing
> problems getting the ethernet working on eth1...
> IE:  No connection between linux box and the pc's it's connected to..
when you set up the routing for eth1, do not use a default gw.  Windows
box on your 192 net should default to the ip of your linux eth1.

davep@fw:/etc/network$ cat interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian
# (network, broadcast and gateway are optional)
#auto eth0
iface eth0 inet static

#auto eth1
iface eth1 inet static

davep@fw:/etc/network$ /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface U     0      0        0
eth1   U     0      0        0
eth0         UG    0      0        0
eth1         UG    0      0        0

This works here -

I really have a, so I need a gw to that LAN, you do

all you need is:

/sbin/route add -net 192.168.whatever eth1 

no broadcast (linux fingers that out, and if you do use a gateway
address it MUST be directly reachable from the routed interface - that
is what a gateway means - "If you need to get out of here, this is an
address you can talk to directly, that know's how to get out" but you
allways need to be able to ping your gateway adress _directly_

Once you bring up eth1 with no gw, you should be able to ping windows
boxes on the 192 network; then you can worry about making iptables run.

I just compiled a 2.4.18 kernel with ALL the netfilter options as
modules and it works great.


Reply to: