All of lore.kernel.org
 help / color / mirror / Atom feed
* is this make sense: iptables -A PREROUTING -t nat -j SNAT --to 0.0.0.0
@ 2005-03-22 14:47 Nguyen Dinh Nam
  2005-03-22 14:55 ` Max Kellermann
  2005-03-25 17:28 ` Nguyen Dinh Nam
  0 siblings, 2 replies; 8+ messages in thread
From: Nguyen Dinh Nam @ 2005-03-22 14:47 UTC (permalink / raw)
  To: netfilter-devel

Currently, SNAT/MASQ is only allowed in POSTROUTING/nat so at the 
internet gateway, everyone is doing something like this:
iptables -A POSTROUTING -t nat -o $external_interface -j SNAT --to 
$external_ip

But I think that this approach is more interesting
iptables -A PREROUTING -t nat -j SNAT --to 0.0.0.0

The rule clears the source IP address from the packet, later, routing 
code will bind an ip address to the packet based on routing decision. In 
the case where the host has several internet providers, the traditional 
method needs several rules, as well as using CONNMARK to bind each TCP 
connection to only one internet provider. If this new approach is 
possible, it'll simplify the problem tremendously

I've never touched netfilter source code so I don't know if it's 
possible, it may be just a stupid idea.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-26 15:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.