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>
|