From: Christian Benvenuti Date: Fri, 06 Apr 2007 22:29:50 +0000 Subject: [LARTC] Re: Routing Question Message-Id: <1175898590.8051.10.camel@benve-laptop> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Hi Fernando, >Hi, Somebody can help me , i have a linux gateway running ipsec, so if >i ping a host on a remote ipsec network from gateway packet goes out >with external ip address of gateway , is there a way that packets going >from gateway to a remote network be sourced from internal gateway ip ? > >Thanks in advance >Fernando I do not know what your setup and exact needs are, but have you tried the "src" option of the "ip route" command? Example: ip route add dev eth1 192.168.1.0/24 src 10.0.1.1 ^^^^^^^^^^^^ The routing code uses the primary IP address of the outgoing interface, unless you explicitly configure the preferred source address (as in the example above). Regards /Christian [http://benve.info] _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc