We had leased line but it was too narrow for our office and work (ok, 2 years ago
64kbit/sec line was very good) and decided to install ADSL. Everything went smooth
and it's working perfectly from the ADSL point of view. But we still had the leased line.
So, the machine has got 3 NICs, and the links looks like this:
Net-----ADSL provider (dynamic IP)--------------| ppp0-eth0 eth1|---LAN (192.168.1.0/24)
| | |
| | |
| | |
|----Leased line (router: 22.214.171.124) |eth2 |
(network: 126.96.36.199) |----------------
I want to use the leased line to provide low volume mailing lists for our clients, secondary
DNS and so on. So, when LAN machines goes out to administer or browse the Net they
should use the ADSL line.
The problem is that the system doesn't want to recognize the configuration of
eth2. System is Debian Woody. /etc/network/interfaces follows:
iface lo inet loopback
iface eth1 inet static
iface eth2 inet static
When ppp link stands up it becames the default route. And the routing table looks like this:
core-3-g5.netpo * 255.255.255.255 UH 0 0 0 ppp0
188.8.131.52 * 255.255.255.252 U 0 0 0 eth2
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
default core-3-g5.netpo 0.0.0.0 UG 0 0 0 ppp0
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.
I know I just overlooked something. Maybe I couldn't solve this without
implemetnig a policy routing (I've done this before but I try to solve this
an other way)
Kernel is 2.4 so maybe I can use iptables for proper source routing.
Give me URIs, RTFMs and so on.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!