From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@lists.netfilter.org>
Subject: Re: Force use of outgoing IP address
Date: Fri, 01 Jun 2007 12:22:56 -0500 [thread overview]
Message-ID: <466055F0.5050405@riverviewtech.net> (raw)
In-Reply-To: <B3FAB89EFECD684E9E648B81133263F1466025@MAIL_COM.MULBERRY.COM>
On 06/01/07 11:42, Neil Russell wrote:
> I have a linux router with 3 network cards in, each card has multiple
> IP address's assigned. I want to route all aoutbound traffic TO a
> destination port of $DESTPRT out of eth0 on its IPAddress of
> 10.0.0.2.
If you want ONLY the traffic that is destined to $DESTPRT to use the
alternative IP, you will probably need to set up multiple routing tables
similar in all respects except for the source IP used. Then you can use
"ip rule" to decide which traffic uses the alternative routing table
and source IP. I.e. everything by default uses the main IP address
while only traffic destined to $DESTPRT uses the other IP. Is this what
you are after?
> So ALL traffic on the router with a destination address MUST go out
> on eth0 and show its IP address as 10.0.0.2 even though the default
> route is out via 10.0.0.1
Hugh? Are you saying you want all traffic leaving the system to have an
IP address of 10.0.0.2 not 10.0.0.1? If this is the case, switch the
first and second IP address in your configuration. I believe by default
the system will use the primary IP address of an interface as it's
default that it bind traffic to. I.e. eth0 verses eth0:1 / eth0:2.
Though I'm not sure, it may choose the lowest IP address not the first one.
> Hope thats clear and that someone can advise.
No, not really. I'm having trouble identifying which types of traffic
you are wanting to change both up top and down below.
Grant. . . .
next prev parent reply other threads:[~2007-06-01 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 16:42 Force use of outgoing IP address Neil Russell
2007-06-01 17:22 ` Grant Taylor [this message]
2007-06-01 17:24 ` John A. Sullivan III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=466055F0.5050405@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=gtaylor+reply@riverviewtech.net \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.