Re: Fwd: Routing to and from an IP on an interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux