<feed xmlns='http://www.w3.org/2005/Atom'>
<title>firewall4/root/sbin, branch master</title>
<subtitle>OpenWrt nftables firewall</subtitle>
<id>https://git.openwrt.org/project/firewall4/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/firewall4/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/'/>
<updated>2026-11-03T13:36:44Z</updated>
<entry>
<title>Revert "fw4: restart in a single nft transaction"</title>
<updated>2026-11-03T13:36:44Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2026-11-03T13:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=d961882bafe856240344f5856f5f6a39597aaf90'/>
<id>urn:sha1:d961882bafe856240344f5856f5f6a39597aaf90</id>
<content type='text'>
This reverts commit c22c2f241e9e99e93093ba8a8f49bb5a77a325b7.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>fw4: restart in a single nft transaction</title>
<updated>2026-11-02T23:15:59Z</updated>
<author>
<name>Pierre-Yves Le Borgne</name>
</author>
<published>2026-10-17T01:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=c22c2f241e9e99e93093ba8a8f49bb5a77a325b7'/>
<id>urn:sha1:c22c2f241e9e99e93093ba8a8f49bb5a77a325b7</id>
<content type='text'>
"fw4 restart" deleted the fw4 table, then rendered and loaded the
ruleset again, in two nft runs. In between there was no fw4 table: no
filtering and no NAT. The replies of established masqueraded
connections were then no longer translated back, arrived for the
router's own address and were answered with resets. The LAN host
waiting for them is never told, so a download through the router hangs
until the application gives up. Packets forwarded in that window were
not filtered either.

Delete the table and load the new ruleset in one nft transaction
instead. The old ruleset stays in force until the new one replaces it,
and unlike a reload the restart still removes everything that is not in
the new ruleset.

Tested on an x86_64 router with kernel 6.18 and a TCP download through
a masqueraded interface: "fw4 restart" made the router send 8 resets
and the download never resumed. With this change there is no reset and
no gap, a chain and a set added by hand are gone after the restart, and
a restart of a stopped firewall loads it.

Assisted-by: Claude Code (Claude Opus 5.5)
Signed-off-by: Pierre-Yves Le Borgne &lt;pylaterreur@gmail.com&gt;
</content>
</entry>
<entry>
<title>init: remove unnecessary stop logic</title>
<updated>2025-03-17T15:44:40Z</updated>
<author>
<name>Andris PE</name>
</author>
<published>2024-09-02T15:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=00fc6943a29732375addf72a12f2381df5b25428'/>
<id>urn:sha1:00fc6943a29732375addf72a12f2381df5b25428</id>
<content type='text'>
Always remove table and service state to have consistent cleaned up
system state on exit even if user intentionally dropped our table.
Removes dependency on grep as a consequence.

Ref: https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables
Supersedes: https://github.com/openwrt/firewall4/pull/33
Signed-off-by: Andris PE &lt;neandris@gmail.com&gt;
</content>
</entry>
<entry>
<title>cli: introduce test mode and refuse firewall restart on errors</title>
<updated>2022-09-01T10:19:14Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-09-01T10:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=f5fcdcf2c51f6f0a4b116c352000c4fe0523be77'/>
<id>urn:sha1:f5fcdcf2c51f6f0a4b116c352000c4fe0523be77</id>
<content type='text'>
 - Introduce a new `fw4 [-q] check` command which tests the rendered ruleset
   using nftables' --check mode. This is useful to assert complex rulesets
   using external includes for correctness.

 - Extend the `fw4 restart` command to check the rendered ruleset before
   flushing the existing ruleset.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>fw4: add support for configurable includes</title>
<updated>2022-06-15T11:32:17Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-06-13T13:49:14Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=11256ff0374fb594e31b0a4e3857f3810ba2933d'/>
<id>urn:sha1:11256ff0374fb594e31b0a4e3857f3810ba2933d</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>fw4: prefer /dev/stdin if available</title>
<updated>2022-05-31T18:55:36Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-05-31T18:55:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=210991df51587bdb736b4fc74b1200ec6cf6ecc7'/>
<id>urn:sha1:210991df51587bdb736b4fc74b1200ec6cf6ecc7</id>
<content type='text'>
The nftables executable treats `-` and `/dev/stdin` specially when processing
nft scripts from stdin; it will buffer the contents in order to be able to
print detailled error diagnostics. The `/proc/self/fd/0` path used by `fw4`
does not get this special treatment which will lead to nftables error
messages without any reported context.

Make the `fw4` executable prefer `/dev/stdin` in case it exists and fall back
to using `/proc/self/fd/0` as before.

Ref: https://github.com/openwrt/openwrt/issues/9927
Ref: https://git.openwrt.org/50bc06e774f89517f98c89c76a7626f35c3ff659
Ref: https://git.netfilter.org/nftables/tree/src/libnftables.c?h=v1.0.3#n733
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>fw4: make `fw4 restart` behavior more robust</title>
<updated>2022-05-31T07:36:20Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-05-31T07:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=4e5e3226260a7a67dce325314d0926745727bab0'/>
<id>urn:sha1:4e5e3226260a7a67dce325314d0926745727bab0</id>
<content type='text'>
Start the firewall on `fw4 restart` even if it was not previously started.

Ref: #9935
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>treewide: forward compatibility changes</title>
<updated>2022-03-22T20:05:17Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-03-22T18:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=fde80708d63d54be18037c598d1e6aef0c65ca08'/>
<id>urn:sha1:fde80708d63d54be18037c598d1e6aef0c65ca08</id>
<content type='text'>
Adapt testsuite code and fw4 wrapper to current ucode HEAD semantics,
in particular ensure that main.uc is invoked as template since ucode now
defaults to raw mode for cli invocations.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>treewide: move executables to /sbin</title>
<updated>2022-01-06T12:46:35Z</updated>
<author>
<name>Stijn Tintel</name>
</author>
<published>2022-01-06T09:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=4ead2a6792a1b2071d037c380e87836ceb07f681'/>
<id>urn:sha1:4ead2a6792a1b2071d037c380e87836ceb07f681</id>
<content type='text'>
In firewall3, the fw3 executable is installed in /sbin. As
luci-app-firewall looks for the fw3 executable in /sbin, the firewall
menu is hidden when firewall4 is installed. Move both executables to
/sbin so the firewall app will show when firewall4 is installed.

Signed-off-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
Reviewed-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
