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

Re: Simple NATed home network problem



On 13 Oct 2002, Birzan George Cristian wrote:

> On Sun, 2002-10-13 at 10:14, John Reinke wrote:
> > Here's what I have in the file:
> >
> > # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
> >
> > # The loopback interface
> > auto lo
> > iface lo inet loopback
> >
> > # The first network card - internet connection
> > auto eth0
> > iface eth0 inet dhcp
> >
> > # The second network card - local network
> > auto eth1
> > iface eth1 inet static
> > 	address 172.16.1.1
> > 	netmask 255.255.255.0
> > 	broadcast 172.16.1.255
> > 	network 172.16.1.0
> > 	gateway 172.16.1.1
> You don't need the broadcast and network part. That's not what's wrong,
> though. The gateway is what screws it. It adds a default route through
> 172.16.1.1, which is obviously wrong.As the default route given to you
> by your ISP's DHCP server gets set before this one, it gets overridden.
> You should use gateway for your default gateway and _only_ for that.

My first reaction was that you were wrong, since I essentially had the
same /etc/network/interfaces file on the box under Potato. I knew that I
had added the auto lines since (why do I now need those auto
statements???), but had forgotten that I had originally had the LAN
interface listed before the dhcp interface. That agrees totally with what
you said, and was indeed the solution I needed. Thanks!

I am now able to get a couple of different scipts to set up iptables and
NAT/Masq successfully, but there is one side effect I'm not sure how to
deal with.

>From time to time, a message will output to a console where I am logged in
as root saying something like:

aditIN=eth0 OUT= MAC=.... SRC=... DEST=...

..and so forth. I assume something within the iptables setup script is
telling it to do that. What type of statement is likely creating that
output, and is there a way to stop it or redirect it so I don't have
output going to a terminal/console I am using?

Thanks,
John



Reply to: