Dual Internet Connection
Quoted 10 lines
Message: 9
From: Antony Stone <[email protected]>
Organization: Software Solutions
To: <[email protected]>
Subject: Re: Dual Internet Connection
Date: Mon, 1 Jul 2002 08:52:20 +0100Quoted 1 line · Dan Crooks
I have two internet connections, one DSL and one Cable. I want to run
both
Quoted 2 lines
Quoted 2 lines
connections to one machine using seperate NIC's. Can I apply the same rules to both interfaces? I can't see a problem with incoming
connections
Quoted 4 lines
Quoted 4 lines
but not sure about the outgoing.
I want to be able to select what connection each computer on my LAN uses for it's internet connection by changing their gateway. I'm just not
sure
Quoted 4 lines
Quoted 1 line
how to implement the firewall.
You will find this a *little* tricky using a single firewall - it would be easier to use two firewalls, possibly with 3 NICs each - internal,
external,
Quoted 2 lines
and to the other firewall, but if you want to do it on one machine, you'll need to learn about iproute2 and special routing table methods for
specifying
Quoted 1 line
different external routes depending on the source address from your
internal
Quoted 3 lines
machines.
The netfilter rules are no problem - just specify whatever you want and
they
Quoted 1 line
will do their job - the less simple part is getting the underlying routing
on
Quoted 1 line
the machine to send the packets out where you want them to go...
The setup I have now routes all packets from the internal network to the gateway
machine (if the packets are not destined to another machine on the lan of course).
I then add another interface to the gateway machine and modify the firewall to masq
outbound traffic from the lan.
I change nothing on the lan machines. They should still access the internet the
same as before. I then change the gateway on one lan machine and point it to the
new interface/gateway.
When the replies to the traffic come back, wouldn't iptables know which interface
to route the traffic to and send it to right machine? What am I missing here?