problem with two default routes

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm trying to set up a gateway for a local network to use two dsl
lines. Ok, I read the LARTC howto and set up two routing tables and
the correct balancing default gw. It works fine for connections
originating locally on the gw machine. Then I added two iptables rules
on the nat table:

iptables -t nat -A POSTROUTING -s 192.168.4.0/24 -o $TI_IF -j SNAT
--to-source $TI_IP
iptables -t nat -A POSTROUTING -s 192.168.4.0/24 -o $MC_IF -j SNAT
--to-source $MC_IP

ok, now all local ip can go to the internet but all connections go to
the second route specified in the default, whatever it is.
Here's the default (as found on the howto):


ip route add default scope global \
       nexthop via $MC_GW dev $MC_IF weight 1 \
       nexthop via $TI_GW dev $TI_IF weight 1

If I reverse the position of the two nexthop then traffic from
localnet switches to the other dsl line.
Order of the iptables rules doesn't affect the behaviour.
Am I missing something?

TIA

Francesco
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux