Skip to content

Migrate GitLab and NixOS runners from iptables to nftables #384

@emmacasolin

Description

@emmacasolin

Specification

Once the GitLab runner supports nftables we should migrate our iptables usage over to nftables. There are many reasons for doing this, including:

  • iptables is becoming obsolete and is being replaced with nftables
  • nftables is more customisable and has more options than iptables
  • iptables uses a lock (xtables.lock) that is not restricted to individual namespaces (we've had problems with this in the past) - nftables doesn't use thisover xtables.lock so this can be removed

We already have nftables equivalents of the commands we're using in our NAT utils. They can be found here in our wiki: https://github.com/MatrixAI/js-polykey/wiki/nat-traversal#nat-traversal-testing

Additional context

Tasks

  1. Change GitLab runner image from iptables-legacy to nftables
  2. Change NAT utils to use nft commands instead of iptables commands
  3. Remove xtables.lock temp fixes from GitLab runner
  4. Update the describeIf and testIf usage in the NAT tests to check for the existance of the nft command rather than the iptables command

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