Skip to content

IPv6 (ip6tables)

On iptables hosts in full mode, FireHawk can manage ip6tables too, as a separate IPv6 ruleset: the tables filter (IPv6), nat (IPv6), mangle (IPv6), raw (IPv6) and security (IPv6) appear next to the IPv4 ones, with their own chains, policies and rules.

IPv6 management is switched on per host. New hosts have it on; hosts that existed before the feature have it off. nftables hosts do not need it: inet tables already cover both families.

The IPv6 (ip6tables): bar in the Desired tab shows one of three states:

State Meaning
not managed ip6tables is left as it is, and IPv6 addresses are left out of the rules.
managed, but no IPv6 rules are loaded yet Deploys are refused until you load them.
managed in the (IPv6) tables below Deployed with ip6tables-restore.
  1. Click Manage IPv6 too in the IPv6 bar.
  2. The dialog Load IPv6 rules from host opens. It replaces only the desired IPv6 tables with the host’s current ip6tables rules. The IPv4 desired rules, including changes you have not deployed yet, stay as they are.
  3. Review the changes and click Replace desired IPv6 rules.

The IPv6 tables now appear as (IPv6) tabs. Reload IPv6 from host reads them again later. Nothing changes on the host until you deploy.

Hosts in managed-chain mode take over all rules first.

A rule only gets addresses of its table’s IP version:

  • In IPv4 tables only IPv4 addresses are used, in IPv6 tables only IPv6 ones. One alias with both kinds serves both rulesets; with ipset it becomes fh_<alias> (IPv4) and fh_<alias>_6 (IPv6).
  • An IPv4 rule using an alias with IPv6 networks gets its IPv4 networks only.
  • A rule whose addresses are all of the other version is skipped.

The deploy preview lists Address family warnings for skipped rules, for IPv6 or IPv4 addresses written literally in the wrong table, and, on hosts that do not manage IPv6, for IPv6 alias values left out.

Both rulesets are checked on the host (iptables-restore --test and ip6tables-restore --test) before either is applied. IPv6 rules are snapshotted, rolled back and drift-checked together with the IPv4 ones.

When an IPv6 INPUT or OUTPUT policy is DROP, FireHawk adds the SSH guard and accepts ICMPv6 router and neighbour solicitation and advertisement (types 133 to 136, rules commented firehawk-nd-guard).

IPv6 rules are saved with the distribution’s tooling: the OpenRC ip6tables service on Alpine, ip6tables.init save plus ip6tables.service on RHEL-like systems, rules.v6 of netfilter-persistent on Debian and Ubuntu. Missing packages are offered through Install like the IPv4 ones.

NAT rules in the nat (IPv6) table turn on net.ipv6.conf.all.forwarding.

Stop managing IPv6 deletes the desired IPv6 tables in FireHawk. The ip6tables rules on the host stay as they are, and later deploys leave ip6tables alone. Turning IPv6 on or off resets the drift baseline until the next deploy.