Set up a firewall on Debian 11 or newer using nftables
Nftable is the new tool for firewall configuration in newer Debian releases.
Activate the firewall
sudo systemctl enable nftables.service
sudo systemctl start nftables.servicesudo nft list rulesettable inet filter {
chain input {
type filter hook input priority filter; policy accept;
}
chain forward {
type filter hook forward priority filter; policy accept;
}
chain output {
type filter hook output priority filter; policy accept;
}
}Create firewall rules
Make temporary changes
If you lock yourself out by mistake
PreviousSet up a firewall on Debian 9 using iptablesNextSet up a firewall on Ubuntu 22.04 or newer using UFW
Last updated
Was this helpful?