netdev
[Top] [All Lists]

[PATCH] Restore ROUTE MASQ in 2.4

To: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Subject: [PATCH] Restore ROUTE MASQ in 2.4
From: Julian Anastasov <ja@xxxxxx>
Date: Sun, 20 Jan 2002 19:26:06 +0000 (GMT)
Cc: netdev@xxxxxxxxxxx, <netfilter@xxxxxxxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
        Hello,

        I'm guilty, what to say more. I resurrected the route
masq usage in 2.4:

http://www.linuxvirtualserver.org/~julian/#rtmasq

        By this way the route masq has more priority when
the NAT connections are setup, the Netfilter (iptables/ipchains)
rules play after them.

Examples (nothing new in the usage):

Similar to -j MASQUERADE (but the connections don't die on netdev
down event):

        ip rule add ... lookup TABLE nat 0

Similar to -j SNAT:

        ip rule add ... lookup TABLE map-to EXT_IP

        The first tests work but I'm not sure what is the best
way to correctly stop RTCF_NAT when Netfilter's NAT plays (see
the change in ip_nat_dumb.c).

        May be one bug: inet_rtm_delrule does not match the
srcmap (RTA_GATEWAY) and by this way a wrong rule is deleted
when they differ only by srcmap. Is it fixable?

Regards

--
Julian Anastasov <ja@xxxxxx>


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