[ANN] luanftables - Lua binding for libnftables

29 views
Skip to first unread message

Lourival Vieira Neto

unread,
Mar 22, 2026, 8:17:26 PM (yesterday) Mar 22
to lu...@googlegroups.com
Hi folks,

We've released luanftables, a Lua binding for libnftables. nftables is
the Linux kernel firewall subsystem that replaced iptables.

local nft = require("nftables")
local ctx <close> = nft.new()

ctx:cmd("add table inet filter")
ctx:cmd("add chain inet filter input { type filter hook input priority 0; }")
ctx:cmd("add rule inet filter input tcp dport 22 accept")

The context object supports to-be-closed for deterministic cleanup.
Newline-separated commands execute as a single atomic transaction.
Errors return nil + message. JSON input/output and dry-run validation
are also supported.

MIT license. Requires Lua 5.4+ and libnftables.

http://github.com/ring0networks/luanftables

Regards,
--
Lourival Vieira Neto
Reply all
Reply to author
Forward
0 new messages