Skip to content

iptables doesn't have -C/--check flag in version v1.4.7 which shipped with CentOS 6.5 #6831

Closed

Description

@kenshin54

Docker will create an iptables masquerading rule on the host machine when it starts. But old version iptables doesn't have this flag, docker will create duplicate rule after restart.

7903bc84-0ab4-47da-99a9-56a9290d39bf

Activity

  1. vieux commented on Jul 3, 2014

    @vieux
    Contributor

    ping @tianon ?

  2. tianon commented on Jul 3, 2014

    @tianon
    Member

    I don't have anything to add here; we need someone familiar with Docker's iptables code, and maybe someone familiar with ancient iptables nonsense. :)

  3. erikh commented on Jul 3, 2014

    @erikh
    Contributor

    So I ended up looking at it for other reasons. I’m not entirely sure what —check does, but in the —wait case we run ‘iptables -nL —wait’ and wait for a 0 exit code.

    I think this might be a good option, presuming there’s no functional difference, and I can probably put the patch together for this later tonight.

    -Erik

    On Jul 3, 2014, at 2:41 PM, Tianon Gravi [email protected] wrote:

    I don't have anything to add here; we need someone familiar with Docker's iptables code, and maybe someone familiar with ancient iptables nonsense. :)

    —
    Reply to this email directly or view it on GitHub.

  4. vbatts commented on Jul 10, 2014

    @vbatts
    Contributor

    same is true on RHEL6.5

    Chain PREROUTING (policy ACCEPT)
    target     prot opt source               destination
    DOCKER     all  --  anywhere             anywhere            ADDRTYPE match dst-type LOCAL
    
    Chain POSTROUTING (policy ACCEPT)
    target     prot opt source               destination
    MASQUERADE  all  --  172.17.0.0/16       !172.17.0.0/16
    MASQUERADE  tcp  --  192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535
    MASQUERADE  udp  --  192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535
    MASQUERADE  all  --  192.168.122.0/24    !192.168.122.0/24
    MASQUERADE  tcp  --  192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535
    MASQUERADE  udp  --  192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535
    MASQUERADE  all  --  192.168.122.0/24    !192.168.122.0/24
    MASQUERADE  all  --  172.17.0.0/16       !172.17.0.0/16
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    DOCKER     all  --  anywhere            !loopback/8          ADDRTYPE match dst-type LOCAL
    
    Chain DOCKER (2 references)
    target     prot opt source               destination
    DNAT       tcp  --  anywhere             anywhere            tcp dpt:49501 to:172.17.0.43:1099
    
  5. tianon commented on Jul 10, 2014

    @tianon
    Member

    So, I really like @jfrazelle's idea of bumping the dep, but I don't know if this is a realistic thing in RHEL/CentOS land, even though it's a minor revision - would that be a possible fix?

  6. tianon commented on Jul 10, 2014

    @tianon
    Member

    As @vbatts noted on the PR, that's not really feasible here. Bummer.

  7. tianon commented on Jul 10, 2014

    @tianon
    Member

    I can totally read - it's way too early. So @vbatts is going to look into whether bumping is feasible, but it may not be.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions