From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damion de Soto Date: Thu, 27 May 2004 23:57:25 +0000 Subject: Re: [LARTC] 2 Gateways Message-Id: <40B68065.9000701@snapgear.com> List-Id: References: <20040527102105.C87294430@outpost.ds9a.nl> In-Reply-To: <20040527102105.C87294430@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Mihai, > But... there is a problem... I have to make the packet (after it has been > SNAT-ed) > follow the gateway corresponding to the $INET_IP_1 or to the $INET_IP_2 > respectively. > > In my routing table I have only one default route... corresponding to one of > the gateways. > Is it possible to have 2 default routes? Is there a more elegant way to > solve this problem? you basically want to use the 'ip route' command, and setup 2 routing tables. > Is there a way to tell the routing table that every request that has the > source address $INET_IP_1 > follow the $GW_1, and every request that has the source address $INET_IP_2 > follow the $GW_2? yup, you setup the two tables, one has GW_1 and one has GW_2, and direct traffic into the tables based on it's address. take a look through the mailling list archives and doco on the web for examples. it's not too hard. regards, -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Damion de Soto - Software Engineer email: damion@snapgear.com SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809 | Custom Embedded Solutions fax: +61 7 3891 3630 | and Security Appliances web: http://www.snapgear.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- Free Embedded Linux Distro at http://www.snapgear.org --- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/