Using nftables in Go

I’ve been recently working with the Go package google/nftables written by Michael Stapelberg and wanted to share some insights on why and how to use it as an alternative to invoking the nft CLI tool via shell commands. Introduction If you are familiar with iptables, you probably know that it has been deprecated in favor of nft as the default Linux firewalling tool. Many systems still use the iptables frontend via iptables-nft which bridges iptables commands to the nftables backend. ...

November 22, 2025 · 9 min · 1797 words · Me