From: Nguyen Dinh Nam <64vn@cardvn.net>
To: Jonas Berlin <xkr47@outerspace.dyndns.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: is this make sense: iptables -A PREROUTING -t nat -j SNAT --to 0.0.0.0
Date: Sat, 26 Mar 2005 22:02:50 +0700 [thread overview]
Message-ID: <4245799A.6010206@cardvn.net> (raw)
In-Reply-To: <42454F80.4090603@outerspace.dyndns.org>
No, AFAIK, SAME is for internet connections which supply a whole subnet
of public IP addresses instead of just 1 IP address. But it's not what I
want. I want to make routing in a multihomed host easier, let me write
an example:
There is a host with 2 PPPOE connections: ppp1 (IP: 11.1.1.1) and ppp2
(IP: 22.2.2.2), so connection teaming is done like this:
ip rule add prio 1 from 11.1.1.1 lookup 101
ip route add table 101 to default dev ppp1
ip rule add prio 2 from 22.2.2.2 lookup 102
ip route add table 102 to default dev ppp2
ip route add default nexthop dev ppp0 nexthop dev ppp1
the problem is that the routing system can depend on the source IP
address (11.1.1.1 or 22.2.2.2) to route the packet to the correct
interface, but packets from the LAN will have LAN ip address when
reaching routing system, thus those packet won't match neither "prio 1"
nor "prio 2" rules.
My idea to solve it is to do something to make netfilter to masquerade
the source of packets (from LAN IP address to 11.1.1.1 or 22.2.2.2)
*before* reaching routing system, so those packets can match "prio 1" or
"prio 2" routing rules. If I know that it's possible, I'll start the new
career of hacking networking code so may be you will have one more
contributor.
Sincerely,
Nam
Jonas Berlin wrote:
> I'm no senior, but could the SAME target in patch-o-matic-ng maybe
> help you out?
prev parent reply other threads:[~2005-03-26 15:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 14:47 is this make sense: iptables -A PREROUTING -t nat -j SNAT --to 0.0.0.0 Nguyen Dinh Nam
2005-03-22 14:55 ` Max Kellermann
2005-03-22 18:56 ` Nguyen Dinh Nam
2005-03-25 17:28 ` Nguyen Dinh Nam
2005-03-25 19:07 ` Newbie question about fragmentation and the PRE_ROUTING hook Devesh Agrawal
2005-03-25 23:32 ` Devesh Agrawal
2005-03-26 12:03 ` is this make sense: iptables -A PREROUTING -t nat -j SNAT --to 0.0.0.0 Jonas Berlin
2005-03-26 15:02 ` Nguyen Dinh Nam [this message]
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=4245799A.6010206@cardvn.net \
--to=64vn@cardvn.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=xkr47@outerspace.dyndns.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.