Skip to content

Concourse uses legacy iptables while there are nf_tables on the system #4557

Closed as not planned

Description

@tunasalat

Bug Report

Concourse uses legacy iptables while there are nf_tables on the system. Is it because iptables binary is baked in the concourse binary? I have to keep two iptables implementations to check the rules which is not great.

Steps to Reproduce

I use CentOS Linux release 8.0.1905 (Core).
Start concourse web and worker. Then check the rules using new and old iptables.

Expected Results

Create rules using actual server iptables implementation.

Actual Results

iptables/xtables-legacy-multi iptables -v
iptables v1.8.3 (legacy)
~/build_iptables/iptables-1.8.3 # iptables/xtables-legacy-multi iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
w--input all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
w--forward all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain w--default (0 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED

Chain w--forward (1 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
DROP all -- 0.0.0.0/0 0.0.0.0/0

Chain w--input (1 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

iptables -v
iptables v1.8.2 (nf_tables)
~/build_iptables/iptables-1.8.3 # iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# Warning: iptables-legacy tables present, use iptables-legacy to see them

Version Info

  • Concourse version: concourse -version 5.6.0
  • Deployment type (BOSH/Docker/binary): binary
  • Infrastructure/IaaS: bare metal
  • Did this used to work? Bumped into this after Centos 8 upgrade.

Activity

  1. kcmannem commented on Oct 4, 2019

    @kcmannem
    Contributor

    We don't own the containerizer, we depend on Garden which uses iptables itself. We're moving towards containerd which has different networking strategies (one of them being iptables as well) so we'll evaluate those when the time comes.

  2. tunasalat commented on Oct 4, 2019

    @tunasalat
    Author

    So shall I wait until you migrate from Garden to containerd, or I could try to post this issue somewhere else?

  3. kcmannem commented on Oct 7, 2019

    @kcmannem
    Contributor

    yeah we'll consider during the migration to containerd.

  4. vito commented on Oct 7, 2019

    @vito
    Contributor

    @tunasalat We're already in the process of migrating fwiw; the epic for it is here. I spiked on it a while back and had success with CNI's firewall plugin which will use firewalld if available and fall back on iptables if not.

  5. taylorsilva commented on Jan 6, 2025

    @taylorsilva
    Member

    Issue Bankruptcy

    This issue is being closed as part of 2025's Issue Bankruptcy declaration. See here for details

    If you think this issue still has merit then feel free to open a new issue and reference this one.


    We should probably migrate to using nftables, but that can be brought up in a newer issue later.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions