This my setup using Debian 6.0. 6. It's role is a proxy server and a load balancer using eight 3G modems.Whenever a ppp connection dials it takes over the default gateway which is ok but it also cuts me out.The reason it's ok is that in Ubuntu I noticed that it does not do that by default. By default it will leave the ethX gateway untouched. I could have added in the ppp options file replacedefaultroute but problems with iptables in Ubuntu made me switch to Debian.Now I cannot ping other hosts on the LAN  but other hosts can ping me. I also lose  connectivity from the outside and the only way I can get access is through another computer from inside the LAN.Also all the hosts in the LAN can use the proxy.What I found out is that if I add a separate routing table called e1 and copy 192.168.2.0/24 dev eth0  proto kernel  scope link  src 192.168.2.126default via 192.168.2.3 dev eth0From the main table into table e1 and then do:ip rule add table e1It works, but this is not what I want since all the connections now flow through the eth0 interface.What can I try to restore the connections comming from outside, and to communicate with the local computers. However all traffic comming from the LAN must still be made through the ppp links.root@proxy:~# iptables -L OUTPUT -t mangle -vChain OUTPUT (policy ACCEPT 433K packets, 217M bytes)pkts bytes target     prot opt in     out     source               destination433K  217M CONNMARK   all  --  any    any     anywhere             anywhere            CONNMARK restore 929 61011 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 MARK set 0x1 929 61721 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 packet 1 MARK set 0x2 929 61461 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 packet 2 MARK set 0x3 929 61438 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 packet 3 MARK set 0x4 929 61530 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 packet 4 MARK set 0x5 929 61022 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 packet 5 MARK set 0x6 929 61738 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 packet 6 MARK set 0x7 928 61224 MARK       all  --  any    any     anywhere             anywhere            state NEW statistic mode nth every 8 packet 7 MARK set 0x8433K  217M CONNMARK   all  --  any    any     anywhere             anywhere            CONNMARK saveroot@proxy:~# iptables -L POSTROUTING -t nat -vChain POSTROUTING (policy ACCEPT 285 packets, 18881 bytes) pkts bytes target     prot opt in     out     source               destination  743 49005 MASQUERADE  all  --  any    ppp0    anywhere             anywhere  705 47291 MASQUERADE  all  --  any    ppp1    anywhere             anywhere  679 45581 MASQUERADE  all  --  any    ppp2    anywhere             anywhere  679 45598 MASQUERADE  all  --  any    ppp3    anywhere             anywhere  670 45177 MASQUERADE  all  --  any    ppp4    anywhere             anywhere  638 42447 MASQUERADE  all  --  any    ppp5    anywhere             anywhere  724 48671 MASQUERADE  all  --  any    ppp6    anywhere             anywhere  679 45182 MASQUERADE  all  --  any    ppp7    anywhere             anywhereroot@proxy:~#root@proxy:~# ip rule0:      from all lookup local32758:  from all fwmark 0x8 lookup d832759:  from all fwmark 0x7 lookup d732760:  from all fwmark 0x6 lookup d632761:  from all fwmark 0x5 lookup d532762:  from all fwmark 0x4 lookup d432763:  from all fwmark 0x3 lookup d332764:  from all fwmark 0x2 lookup d232765:  from all fwmark 0x1 lookup d132766:  from all lookup main32767:  from all lookup defaultroot@proxy:~# ip ro sh t d1default via 10.64.64.64 dev ppp0root@proxy:~# ip ro sh t d2default via 10.64.64.65 dev ppp1root@proxy:~# ip ro sh t d3default via 10.64.64.66 dev ppp2root@proxy:~# ip ro sh t d4default via 10.64.64.67 dev ppp3root@proxy:~# ip ro sh t d5default via 10.64.64.68 dev ppp4root@proxy:~# ip ro sh t d6default via 10.64.64.69 dev ppp5root@proxy:~# ip ro sh t d7default via 10.64.64.70 dev ppp6root@proxy:~# ip ro sh t d8default via 10.64.64.71 dev ppp7root@proxy:~# ip ro10.64.64.67 dev ppp3  proto kernel  scope link  src 10.90.33.22110.64.64.66 dev ppp2  proto kernel  scope link  src 10.18.11.9010.64.64.65 dev ppp1  proto kernel  scope link  src 10.90.14.23510.64.64.64 dev ppp0  proto kernel  scope link  src 10.18.27.22610.64.64.71 dev ppp7  proto kernel  scope link  src 172.22.201.8110.64.64.70 dev ppp6  proto kernel  scope link  src 10.80.131.610.64.64.69 dev ppp5  proto kernel  scope link  src 172.20.17.18310.64.64.68 dev ppp4  proto kernel  scope link  src 10.80.61.34192.168.2.0/24 dev eth0  proto kernel  scope link  src 192.168.2.126default via 192.168.2.3 dev eth0root@proxy:~#If you can give me some ideas I would appreciate it..
Policy routing with load balanced ppp connections
iptables;ip;routing;squid