Routing problems

Linux Advanced Routing and Traffic Control

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

 



Hi,

I have some problems with my routing configuration.
My router has two connections to the internet, eth1 (2Mbit) and ppp0 (ADSL).
On the eth1 connection I do a ?snat and on ppp0 I do masquerading.

I use iptables to mark packets / connections in the -t mangle -A PREROUTING and OUTPUT chains. The marks (1 and 2) are used to decide which route do use to route a packet.

My routing configuration:

#ip rule list
0:      from all lookup local
32678:  from all fwmark        1 lookup EXT_2M_RT
32679:  from all fwmark        2 lookup EXT_DSL_RT
32680:  from 80.129.94.144 lookup EXT_DSL_RT
32681:  from 195.145.7.218 lookup EXT_2M_RT
32766:  from all lookup main
32767:  from all lookup default

#ip route list
217.5.98.16 dev ppp0  proto kernel  scope link  src 80.129.94.144
195.145.7.216/29 dev eth1  proto kernel  scope link  src 195.145.7.218
172.25.0.0/16 dev eth0  proto kernel  scope link  src 172.25.0.1
127.0.0.0/8 via 127.0.0.1 dev lo  scope link
default via 195.145.7.217 dev eth1

#ip route list table EXT_DSL_RT
80.129.94.144 dev ppp0  scope link  src 80.129.94.144
195.145.7.216/29 dev eth1  scope link  src 195.145.7.218
172.25.0.0/16 dev eth0  scope link  src 172.25.0.1
127.0.0.0/8 dev lo  scope link  src 127.0.0.1
default via 217.5.98.16 dev ppp0  src 80.129.94.144

#ip route list table EXT_2M_RT
80.129.94.144 dev ppp0  scope link  src 80.129.94.144
195.145.7.216/29 dev eth1  scope link  src 195.145.7.218
172.25.0.0/16 dev eth0  scope link  src 172.25.0.1
127.0.0.0/8 dev lo  scope link  src 127.0.0.1
default via 195.145.7.217 dev eth1  src 195.145.7.218

For my routed packets, incoming on eth0, everything works fine, but for the packets generated by the router itself I have problems. 

For example I mark RSYNC packets, with mark 2, to use the DSL connection. The router  sends out the packet over the DSL connection, but with the IP address of eth1?

Somebody knows what?s wrong?

Greets,
JanÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿËÂ?¨¥?x%?Ë,Sù??Y??÷lõ¯ç?m§ÿÿ?¨¥?©ÿvÏZþy?¨¥?©ÿ?+-?wèþV«µÁÎY3ÿ?Ûiÿÿåj»\þ?à


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