<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 - type nat hook output doesn't work anymore"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1168">1168</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>type nat hook output doesn't work anymore
</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>All
</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>kernel
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pablo@netfilter.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>maxime.deroucy@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>In may I made some tests on nftables :
<a href="https://www.craoc.fr/articles/nftables/">https://www.craoc.fr/articles/nftables/</a>
Then the following rule was working.
```
table ip iptest {
chain outputnat {
type nat hook output priority 0; policy accept;
ip protocol icmp log prefix "OUTPUT NAT IP: "
}
}
```
As I get the following I my logs :
```
…
OUTPUT NAT IP: IN …
…
```
Today (15/08/2017) I wanted to replace the following iptables rule :
```
iptables -t nat -A OUTPUT -d … -p tcp --dport 80 -m owner \! --uid-owner nobody
-j REDIRECT --to-port 12345
```
I tried :
```
table ip testtable {
chain testchain {
type nat hook output priority 0; policy accept;
ip daddr … tcp dport 80 meta skuid != nobody redirect to 12345
}
}
```
But it didn't worked.
I tried the tests I did back in may but "OUTPUT NAT IP" doesn't show up anymore
in my logs.
I tried many things and nothing worked…
It seems the "type nat hook output" doesn't work anymore.
To reproduce :
```
root@max-laptop # nft add table ip testtable
root@max-laptop # nft add chain testtable testchain \{ type nat hook output
priority 0 \; \}
root@max-laptop # nft add rule testtable testchain log prefix TEST
root@max-laptop # ping -c 3 gateway
root@max-laptop # journalctl -e -k | grep TEST
```
Current result : no log matching TEST
Expected result : 1 log line matching TEST
I am using Archlinux
```
% uname -a
Linux max-laptop 4.12.6-1-ARCH #1 SMP PREEMPT Sat Aug 12 09:16:22 CEST 2017
x86_64 GNU/Linux
% nft -v
nftables v0.7 (Scrooge McDuck)
```</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>