On Mar 13 2007 10:28, Petr Pisar wrote:
>On 2007-03-13, Nathan @ Netdigix Systems <lists@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
>table.
>
>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
connections.
Jan
--
|