[H-GEN] Question on routing in multi homed hosts

Russell Stuart rstuart at lubemobile.com.au
Fri Sep 19 00:06:45 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

I manage a couple of hosts running Linux that have multiple connections
to the internet.  One of these connections is considered the "main"
connection and so has the default route is pointing to it.  I generally
route some common traffic through the "non main" one to get some load
balancing.  This all works fine for outgoing connections.

My difficulty arises when and random external IP chooses to connect to
the "non main" IP address.  The reply goes out the "main" connection
(because of the default route) even though the source ip address in the
packet is for the "non main" connection.  The ISP, if they are have done
their homework, then drops it because it appears to have a spoofed
source ip address.

I have got around this through a complicated scheme of using "ip rule"
to select different routing tables, depending on what the source IP is
the packet it.  Effectively this means I must replicate the main routing
table for each connection to the internet.  As some of these "non main"
connections have dynamic IP's that has to be done by a script ... very
messy.

I was just wondering if there was an easier way.  Anybody know of one?

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list