NetFilter
[Top] [All Lists]

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

To: netfilter@lists.netfilter.org
Subject: Re: Fwd: Routing to and from an IP on an interface
From: Petr Pisar <xpisar@fi.muni.cz>
Date: Tue, 13 Mar 2007 10:28:47 +0000 (UTC)
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
References: <1173760381.45f6297d9a03d@mail.dreamtoy.net>
Sender: netfilter-bounces@lists.netfilter.org
User-agent: slrn/0.9.8.1 (Linux)
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.

-- Petr



<Prev in Thread] Current Thread [Next in Thread>