[Bug 1410] STATELESS, rules with notrack into a map

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Thu Apr 16 10:33:24 CEST 2020


https://bugzilla.netfilter.org/show_bug.cgi?id=1410

--- Comment #5 from Pablo Neira Ayuso <pablo at netfilter.org> ---
(In reply to Pablo Neira Ayuso from comment #3)
[...]
> > snat to ip saddr map { 2.2.2.2 : 1.1.1.1, 2.2.2.3 : 1.1.1.2 }
> > 
> > This reads as follows: if packets came _from_ IP address 2.2.2.2, the
> > rewrite source address to 1.1.1.1 and so on.
> 
> nft add rule raw PREROUTING ip saddr set ip saddr map { 1.1.1.1 : 2.2.2.2,
> 1.1.1.2 : 2.2.2.3 } notrack

Assuming the legacy table/chains, you can use posrtouting/mangle for the
stateless dnat

nft add rule mangle POSTROUTING ip saddr set ip saddr map { 1.1.1.1 : 2.2.2.2,
1.1.1.2 : 2.2.2.3 } notrack

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20200416/b94f2ba4/attachment.html>


More information about the netfilter-buglog mailing list