<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#c7">Comment # 7</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#c6">comment #6</a>)
<span class="quote">> (In reply to Pablo Neira Ayuso from <a href="show_bug.cgi?id=1410#c5">comment #5</a>)
> > (In reply to Pablo Neira Ayuso from <a href="show_bug.cgi?id=1410#c3">comment #3</a>)
> > [...]
> > > > 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
>
> You will still still to disable conntrack from PREROUTING for stateless
> dnat, so this would be:</span >
This example is actually stateless snat, sorry for the typo.
<span class="quote">> nft add rule raw PREROUTING ip saddr { 1.1.1.1, 1.1.1.2} notrack
>
> The rule above disables conntrack for traffic coming from 1.1.1.1 and
> 1.1.1.2, then:
>
> 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 }
>
> This rule performs the stateless snat.
>
> I can place these examples in the wiki if you like.</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>