<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - STATELESS, rules with notrack into a map"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1410#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - STATELESS, rules with notrack into a map"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1410">bug 1410</a>
from <span class="vcard"><a class="email" href="mailto:pablo@netfilter.org" title="Pablo Neira Ayuso <pablo@netfilter.org>"> <span class="fn">Pablo Neira Ayuso</span></a>
</span></b>
<pre>(In reply to Pablo Neira Ayuso from <a href="show_bug.cgi?id=1410#c3">comment #3</a>)
<span class="quote">> (In reply to e.lohmann from <a href="show_bug.cgi?id=1410#c2">comment #2</a>)
> > Hi Pablo,
> >
> > thanks for your answer. No, what I like to do in RAW is the same I do in NAT
> > Pre/Post.
> >
> > dnat to ip daddr map { 1.1.1.1 : 2.2.2.2, 1.1.1.2 : 2.2.2.3 }</span >
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
If you would like to rewrite the destination address based in the existing
destination IP address.
Map lookups allow for any criteria, including concatenations, e.g.
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
In this example, if packets are coming from 1.1.1.1 and going to 2.2.2.2, then
the IP destination address is rewritten to 3.3.3.3</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>