Commands#
> ls -la /usr/sbin/ip* # list all commands, there are many > iptables* # for ipv4 (in debian busters = nft) > ip6tables* # for ipv6 (in debian busters = nft) > iptables-legacy # former ones, not nft > iptables-nft # directly use nftNotes:
- 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