From: dh@syrex.cc
To: lartc@vger.kernel.org
Subject: [LARTC] Multiple Default Gateways
Date: Wed, 28 May 2003 11:06:44 +0000 [thread overview]
Message-ID: <marc-lartc-105412008215254@msgid-missing> (raw)
Is there an easy way to get certain types of traffic (e.g. sport 25) to
be routed over a certain ADSL connection?
I'm currently able to get all Proxy browsing to go via the ADSL
connection by replacing the tcp_outgoing_address and
udp_outgoing_address in squid.conf with the ADSL's current IP and
restarting the proxy server...
I would really like to be able to make certain types of traffic to go
via different links...
Current Setup:
196.38.143.32/28 165.165.?.?
eth1 (ISP Diginet Link) eth2 PPPoE ADSL (Dynamic IP)
| |
|196.38.143.34 $4|
+---------------------------------+
| Linux 7.2 Router |
+---------------------------------+
|192.168.0.1
|
eth0 (Local Network)
192.168.0.0/24
Default Gateway is 196.38.143.34 (Diginet Router)
ip-up.local Script:
case $6 in
out)
# ADSL Internet Access
/sbin/iptables -F special
/sbin/iptables -A special -i $1 -d $4/32 -p tcp --dport 22
--syn -j ACCEPT
/sbin/iptables -A special -i $1 -d $4/32 -p tcp --dport 23
--syn -j ACCEPT
ip rule add from $4/32 table ADSL
# Is there a way to flush all rules referring to the ADSL
table?
ip route del default table ADSL
ip route add default via $5 dev $1 table ADSL
ip route flush cache
cd /etc/squid
cp -f squid.conf.syrex squid.conf
TEMP=$4
export TEMP
find . -name squid.conf -type f -print | xargs perl -i -pe
's/ADSL-IP/$ENV{'TEMP'}/g';
/etc/rc.d/init.d/squid restart
tc qdisc del dev $1 root 2> /dev/null > /dev/null
tc qdisc del dev $1 ingress 2> /dev/null > /dev/null
tc qdisc add dev $1 root handle 1: cbq bandwidth 100mbit avpkt
1000 cell 8
tc class add dev $1 parent 1: classid 1:1 cbq rate 260kbit
weight 26kbit allot 1514 cell 8 prio 5 avpkt 1000 bounded isolated
tc class add dev $1 parent 1:1 classid 1:10 cbq rate 260kbit
weight 26kbit allot 1514 cell 8 prio 1 avpkt 1000
tc class add dev $1 parent 1:1 classid 1:20 cbq rate 234kbit
weight 23.4kbit allot 1514 cell 8 prio 2 avpkt 1000
tc qdisc add dev $1 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $1 parent 1:20 handle 20: sfq perturb 10
tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match
ip tos 0x10 0xff flowid 1:10
tc filter add dev $1 parent 1:0 protocol ip prio 11 u32 match
ip protocol 1 0xff flowid 1:10
tc filter add dev $1 parent 1: protocol ip prio 12 u32 \
match ip protocol 6 0xff \
match u8 0x05 0x0f at 0 \
match u16 0x0000 0xffc0 at 2 \
match u8 0x10 0xff at 33 \
flowid 1:10
tc filter add dev $1 parent 1: protocol ip prio 13 u32 match
ip dst 0.0.0.0/0 flowid 1:20
;;
esac
Regards
David Herselman (Executive Proprietor) -=*> Syrex Intranets <*=-
=- 12 Coronation Road http://www.syrex.co.za
Sandhurst +27-(0)11-883-2246 Voice
2196 +27-(0)11-884-7945 Fax
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2003-05-28 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 11:06 dh [this message]
2003-05-28 13:36 ` [LARTC] Multiple Default Gateways Martin A. Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-105412008215254@msgid-missing \
--to=dh@syrex.cc \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.