Re: Advanced routing question
From: Fraser Campbell (fraser_at_wehave.net)
Date: 07/27/03
- Previous message: Ian Melnick: "Re: Samba Password Expiration"
- In reply to: Haim Ashkenazi: "Advanced routing question"
- Next in thread: Haim Ashkenazi: "Re: Advanced routing question"
- Reply: Haim Ashkenazi: "Re: Advanced routing question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: debian-user@lists.debian.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
this:
# All of my networks
localnet='172.16.0.0/24'
dmz_a='172.17.0.0/24'
dmz_b='172.17.0.0/24
frame='216.1.2.0/28'
# Set default route for frame relay network
ip route add default via 216.1.2.1 table 10 # (table 10 arbitrary choice)
pri=100
# 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
done
pri=200
# 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 <fraser@wehave.net> http://www.wehave.net/ Halton Hills, Ontario, Canada Debian GNU/Linux -- To UNSUBSCRIBE, email to debian-user-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- Previous message: Ian Melnick: "Re: Samba Password Expiration"
- In reply to: Haim Ashkenazi: "Advanced routing question"
- Next in thread: Haim Ashkenazi: "Re: Advanced routing question"
- Reply: Haim Ashkenazi: "Re: Advanced routing question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|