two IP adresses from one network on both firewall cards ?

Axel Stoltenberg axel@urwpp.de
Wed, 16 Jan 2002 17:15:29 +0100


Hello all,
I have the following question:

We have real IP adresses from our class C network assigned to all 
machines in our LAN. Now we got a new fast DSL connection to the Internet 
from our Service Provider. 
 
The new DSL router (which our ISP has installed) also has an IP from our
class C network.

I would like to put a firewall between this router and our LAN.

The firewall has two ethernet cards. I think I would have to 
assign one IP from our class C network to the LAN side of the firewall and
another IP adress from our class C network to its internet side interface.

Is that possible ?

All the samples scripts for "iptables" I have seen up to now assume
different network numbers for the two interfaces in a firewall.

If it is possible to use two IP adresses from the same network, how
can the firewall know, which machine is reachable via eth0 and which is
reachable via eth1 ? 

Are there any sample scripts ?

Any help is appreciated !
Thanks,
Axel