Commands#

There are many commands, see all with

> ls -la /usr/sbin/ip*  # see all command symolic
> iptables*             # for ipv4 (in debian busters = nft)
> ip6tables*            # for ipv6 (in debian busters = nft)
> iptables-legacy       # former ones, not nft
> iptables-nft          # directly use nft
Notes:
  • all iptables commands (for ipv4) have an ip6tabbles* equivalent (for ipv6)
  • see info on nft

Python#

  • package python3-iptables manages legacy ones only
  • package "python3-nftables" manages nft tables
  • alternatively you can use subprocess.run to call the original system commands

import nftables