From: Paul Kelly (longword at domain esatclear.ie)
Date: Fri 14 Jun 2002 - 19:25:40 IST
Deim Agoston wrote:
> OK, the problem as you may see:
> When somebody wants to connect to 184.108.40.206 port 80, they come from network
> 220.127.116.11. The problem is that all packets go back at _ppp0_ instead of
> eth2. And they never get a reply. If I just add another routing
> route add -net 18.104.22.168 netmask 255.255.255.252 gw 22.214.171.124 eth2
> it doesn't work either. OK, I know I should remove the previous routing on eth2.
> But if I did it and routing gone, and added the line above, the kernel gave
> me an error message.
Ah if only life were so simple.
Normally, routing depends solely on the /destination/ address of the
packet. So yes, your 126.96.36.199 packets will come in on eth0, but
any reply will be treated no different from any other packet - thus it
will be thrown back at your default gateway on ppp0.
What you need is iproute2 and the Advanced Routing HOWTO on
http://www.tldp.org/. It's not pretty, and good docs on iproute2 are
very hard to find, but it does get the job done. You can instruct your
kernel to choose the outbound device based on the source IP address of
It's possible something like this might work:
ip rule add from 188.8.131.52/29 table 200
ip route add default via 184.108.40.206 dev eth0 table 200
ip route flush cache
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:16 GMT