Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

my setup

I have 2 ISP connexion : ADSL and SDSL. A qos (named qos, ip : 192.9.201.252) server stands before the ADSL router. It is the only way to access the ADSL gateway (192.9.201.254)
through a bridge (br0). so this qos server is invisible and can easily be unplugged if it fails.

As for now, the default gateway of all LAN computers is 192.9.201.254, and so all traffic pass through the qos.

This setup work very well.

my need

Now, I need to route a defined service (isl) (already marked by iptable for the qos purpose) to the SDSL (192.9.201.251) gateway.

I can achieve that by creating another route table named «isl» and create the default gateway pointing to the SDSL router.

after that, I create a rule that

grep "30 isl" /etc/iproute2/rt_tables || echo "30 isl" >> /etc/iproute2/rt_tables
ip route add default via 192.9.201.251 dev br0 table isl
ip rule add fwmark 0x1e table isl

with this setup, I work if I change all default gateway to 192.9.201.252.

my question

how to force these routing table to apply even if the hosts don't have my qos server as gateway, but always the ADSL router

my thought was to use some iptables rules to NAT all marked packet to local host, which will then redirect traffic to SDSL, but I feel wrong with that.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.