Re: Advanced routing question
From: Fraser Campbell (fraser_at_wehave.net)
To: firstname.lastname@example.org Date: Sun, 27 Jul 2003 13:10:25 -0400
On July 27, 2003 09:10 am, Haim Ashkenazi wrote:
> I'm trying to combine 2 linux firewalls/routers together. the final host
> should have the following ports:
> 1. eth0 - 256kbps frame relay.
> 2. ppp0 (via eth1) - pppoe adsl with dhcp.
> 3. eth2-3 - 2 DMZ's.
> 4. eth4 - localnet.
> The default route is ppp0.
> Here's the problem: If I'll connect to the firewall from the internet
> through eth0 (or even connect to the dmz through the firewall's eth0)
> wouldn't it try to respond through ppp0 (the default gateway) which will
> make the connection impossible?
Yes you need to install some advanced routing rules. Read the advanced
routing howto (http://www.lartc.org/), you'll need something roughly like
# All of my networks
# Set default route for frame relay network
ip route add default via 22.214.171.124 table 10 # (table 10 arbitrary choice)
# ensure that traffic to local IPs is handled by default routing table
for net in $localnet $dmz_a $dmz_b $frame; do
ip rule add to $net lookup main pri $pri
# Make sure that traffic coming from frame IPs get's routing to frame gateway
ip rule add from $frame lookup 10 pri $pri
# Flush route cache to make changes immediate
ip route flush cache
That should handle everything correctly. Have your pppoe software install a
default route when it brings up the connection and you shouldn't have to
worry about any special routing for it.
-- Fraser Campbell <email@example.com> http://www.wehave.net/ Halton Hills, Ontario, Canada Debian GNU/Linux -- To UNSUBSCRIBE, email to firstname.lastname@example.org with a subject of "unsubscribe". Trouble? Contact email@example.com