Fwd: Routing to and from an IP on an interface
jengelh at linux01.gwdg.de
Wed Mar 14 03:05:03 CET 2007
On Mar 13 2007 10:28, Petr Pisar wrote:
>On 2007-03-13, Nathan @ Netdigix Systems <lists at netdigix.com> wrote:
>> Hi I have an issue where the internal interface wants to always talk
>> from the primary ip address, what kind of rule can I add to make the
>> traffic comming from a specific source ip leave the router interface
>> from a specific secondary ip address?
>Source IP address, if not specified by bind(2), depends on routing
>You can add rule which specifies source address explicitly like this:
>ip route add default via <MY_GW> dev <OUT_DEV> src <SRC_IP>
>Maybe, the dev part is optionable.
You can also use netfilter's SNAT to force a specific IP on outgoing
More information about the netfilter