<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Nft syntax error (snat, dnat using multiple maps)"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1225">1225</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Nft syntax error (snat, dnat using multiple maps)
</td>
</tr>
<tr>
<th>Product</th>
<td>nftables
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86_64
</td>
</tr>
<tr>
<th>OS</th>
<td>Ubuntu
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>nft
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pablo@netfilter.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mskim128@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>I use Ubuntu 17.10 (nftables v0.8, v0.8.2, kernel 4.13.0-25)
I'd like to use multiple NATs using nftables maps.
This looks something like this:
nft add rule nat postrouting snat \
ip saddr map { 192.168.1.1 : 10.0.0.1, 192.168.1.2 : 10.0.0.2,
192.168.1.3 : 10.0.0.3 }
It works.
But, I want to use multiple maps. This looks something like this:
192.168.1.0/24 -> NAT -> 10.0.0.0/24
(192.168.1.1 -> 10.0.0.1, 192.168.1.2 -> 10.0.0.2, ..., 192.168.1.254 ->
10.0.0.254)
nft add rule nat postrouting snat \
ip saddr map { 192.168.1.0/24 : 10.0.0.0/24 }
However, error message is displayed.
root@two-All-Series:~# nft add rule nat postrouting snat \
<span class="quote">> ip saddr map { 192.168.1.0/24 : 10.0.0.0/24 }</span >
Error: syntax error, unexpected /, expecting comma or '}'
add rule nat postrouting snat ip saddr map { 192.168.1.0/24 : 10.0.0.0/24 }
^
Thanks,</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>