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

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Fri Apr 17 15:24:31 CEST 2020


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

--- Comment #8 from e.lohmann at mdex.de ---
Hi Pablo,
both rules are accepted by nft, and I think it will do the job.

nft add rule raw PREROUTING ip daddr set ip daddr map { 1.1.1.1 : 2.2.2.2,
1.1.1.2 : 2.2.2.3 } notrack
nft add rule raw PREROUTING ip saddr set ip saddr map { 2.2.2.2 : 1.1.1.1,
2.2.2.3 : 1.1.1.2 } notrack

table ip raw {
    chain PREROUTING {
        type filter hook prerouting priority -300; policy accept;
        ip daddr set ip daddr map { 1.1.1.1 : 2.2.2.2, 1.1.1.2 : 2.2.2.3 }
notrack
        ip saddr set ip saddr map { 2.2.2.2 : 1.1.1.1, 2.2.2.3 : 1.1.1.2 }
notrack
    }
}

> nft add rule raw PREROUTING ip daddr set ip saddr . ip daddr map { 1.1.1.1 . 2.2.2.2 : 3.3.3.3, 1.1.1.2 . 2.2.2.1 : 4.4.4.4 } notrack

Nice possibility to do a rewrite on saddr and daddr inside a map!


The stateless snat example in mangle POSTROUTING is also a good idea, thank you
for that!
Yes please put this into the Wiki, it will help, to understand what is possible
with nft.

Is it also possible to add a network or range into a map and do a saddr/daddr
rewrite? Like it was possible with netmap in iptables?

Regards, Eike

-- 
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/20200417/75a71aa3/attachment.html>


More information about the netfilter-buglog mailing list