python-iptables
python-iptables copied to clipboard
iptables and iptables-legacy with Docker containers
I'm running a Docker container on the host network. I figured out that creating iptables from inside the container will make them appear in the host's iptables-legacy. When running iptc on the host machine, it uses iptables-legacy. However, sometimes I need to access and modify the rules from iptables.
I'm running Raspberry Pi OS.
Is it possible to specify the binary (?) that iptc uses?
Thanks!
It's not a binary, python-iptables uses the underlying C libraries, so it can only work with iptables-legacy rules.
Can you make sure you always use iptables-legacy, both on the host and in the container?
I will try and see if it works for me.