Skip to content

iptables and iptables-legacy with Docker containers #319

Description

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!

Activity

  1. ldx commented on Mar 11, 2021

    @ldx
    Owner

    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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions