I have 2 ISP connexion : ADSL and SDSL.
A qos (named qos, ip : 188.8.131.52) server stands before the ADSL router. It is the only way to access the ADSL gateway (184.108.40.206)
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 220.127.116.11, and so all traffic pass through the qos.
This setup work very well.
Now, I need to route a defined service (isl) (already marked by iptable for the qos purpose) to the SDSL (18.104.22.168) 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 22.214.171.124 dev br0 table isl ip rule add fwmark 0x1e table isl
with this setup, I work if I change all default gateway to 126.96.36.199.
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.