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