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

Re: Slightly OT: Setting the primary NIC



On Sunday, 2004-03-21 at 10:20:06 +0100, Sven Riedel wrote:

> I'm struggeling with a problem on a multi-homed host running debian, and
> as the problem is somewhat security related, I hope you'll tolerate the
> question on this list :)

This isn't freebsd-security ;-)

> Anyway, the Host has an internal NIC and an external NIC (acting among
> other things as a firewall). For some reason, all services think the
> external NIC is the primary, and will try to bind to that/all requests
> from samba/cups etc have a source IP from the external NIC, which
> complicates the setups of the internal hosts.

Are yousaying packets are being sent out of your internal interface with
the source address set to that of the external interface?!? That should
not happen.

Please supply the output of ifconfig -a and netstat -an.

> I've tried switching the order in which the modules for the NICs are
> loaded (eth0 became eth1 and vice versa), the order in which the NICs
> are activated with ifup and some other things, to no avail. I haven't
> found anything at the debian site wrt this problem either - all I can
> say is that the old distribution on the machine didn't have this
> problem (but that was the only saving grace of that distro). 

You are most definitely looking in the wrong place.

> Can anyone tell me how I can tell the machine which NIC is the primary?

There is no such thing as a primary NIC. Unless a daemon explicitly
binds a socket to a specific IP address and send a packet through that
socket, the source IP address is set to that of the interface the packet
is sent on.

So you have a weird configuration for sure.

Lupe Christoph
-- 
| lupe@lupe-christoph.de       |           http://www.lupe-christoph.de/ |
| "Violence is the resort of the violent" Lu Tze                         |
| "Thief of Time", Terry Pratchett                                       |



Reply to: