Linux Netfilter discussions
 help / color / mirror / Atom feed
* If eth0 goes down after a reboot, rules for it will be applied to eth1.
@ 2002-09-11 13:42 Erik Enge
  2002-09-11 14:05 ` Antony Stone
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Erik Enge @ 2002-09-11 13:42 UTC (permalink / raw)
  To: netfilter

Hi all.

I have a question about how ethernet cards work.  I send it here because
I'm thinking that this community probably has dealt with it before, as
it seems to me to be an obvious problem (with no apparent solution to
me; hence this email).

Let's assume I have a firewall with three NICs.  As we know, the
ethernet cards under Unix (I'm running Linux 2.4) are assigned eth0/1/2
and so on based on the bus number the BIOS gives them.  My setup is as
follows:

  NIC 1, eth0, DMZ interface [somewhat laid-back firewall rules]
  NIC 2, eth1, LAN interface [very strict firewall rules]
  NIC 3, eth2, router interface [basically FORWARDs everything]
  NIC 4, eth3, external interface [basically FORWARDs everything]

Now, say we take down the firewall for some reason, and upon it coming
back up eth0 dies.  The bus assigning will then be a bit different, and
so will eth0/1/2 and so on (which is what the firewall rules are set
against).

This means that I could end up in a situation where my laid-back DMZ
rules were applied to my LAN interface and my external interface would
still work, because it would take the eth2 which is pretty laid-back.
The only thing that wouldn't work (which would trigger me that something
was wrong) is that I can't access the DMZ and my router interface.
However, if I'm unlucky, some cracker might have enough time to intrude
into my, now completely open, LAN interface and its associated network.

So, my question then, is how do you guys deal with this?  Is there a way
to ensure that the card in slot such-and-such is assigned eth1 every
single time, even if the card assigned to eth0 dies?  Or is there
another and perhaps better solution to all this?

Thanks for any replies,

Erik Enge.


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: If eth0 goes down after a reboot, rules for it will be applied to eth1.
@ 2002-09-11 16:14 Erik Enge
  2002-09-11 17:44 ` Antony Stone
  0 siblings, 1 reply; 11+ messages in thread
From: Erik Enge @ 2002-09-11 16:14 UTC (permalink / raw)
  To: netfilter; +Cc: Antony

On Wed, 11 Sep 2002 15:05:54 +0100, Antony Stone wrote:

> The IP address which was supposed to be on the 'real' eth0, which has
> just died, gets applied to what you think is eth1 (even though your
> computer has just decided to rename it eth0 as the first working
> ethernet card it found).

Correct:

Before death of NIC 1:

  NIC 1, eth0, 192.168.1.1
  NIC 2, eth1, 192.168.1.2
  NIC 3, eth2, 192.168.1.3
  and so on...

After death of NIC 2:

  NIC 1 - dead
  NIC 2, eth0, 192.168.1.2
  NIC 3, eth1, 192.168.1.3
  and so on...

> It is almost inconceivable that the interface connecting you to the
> outside world will deign to communicate with your router (or whatever
> else is the next hop upstream of you) because the IP address, network
> address, default gateway, netmask etc don't match.

I don't follow you.  Let's suppose that the external interface now has
very laid-back rules and still has the same IP address, network address,
default gateway and netmask (because the 'ifconfig' statement wouldn't
have changed).  Why is it inconceivable that that interface wolud
communicate with my router?  I can't see why it wouldn't.

Thanks for your reply,

Erik Enge.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-09-12  4:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-11 13:42 If eth0 goes down after a reboot, rules for it will be applied to eth1 Erik Enge
2002-09-11 14:05 ` Antony Stone
2002-09-11 17:19 ` Michael H.Collins
2002-09-11 18:19 ` Lists
2002-09-11 18:32   ` Antony Stone
2002-09-12  4:11     ` Lists
  -- strict thread matches above, loose matches on Subject: below --
2002-09-11 16:14 Erik Enge
2002-09-11 17:44 ` Antony Stone
2002-09-11 18:25   ` Erik Enge
2002-09-11 18:47     ` Antony Stone
2002-09-11 20:21       ` Erik Enge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox