Bug 58487 - Реализовать переключение iptables между xtables-legacy-multi и xtables-nft-multi через alternatives
Summary: Реализовать переключение iptables между xtables-legacy-multi и xtables-nft-mu...
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: iptables (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 enhancement
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-02 16:24 MSK by geochip@altlinux.org
Modified: 2026-04-03 23:43 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description geochip@altlinux.org 2026-04-02 16:24:29 MSK
Предлагается реализовать возможность назначать симлинки /usr/sbin/ip{,6}tables{,-restore,-save} на xtables-legacy-multi или xtables-nft-multi через alternatives.

Это должно упростить переключение между legacy и nft. Для совместимости можно выставить legacy более высокий приоритет.

Подобным образом сделано, например, в debian и fedora.

fedora:
```
# alternatives --display iptables
iptables - status is auto.
 link currently points to /usr/bin/iptables-legacy
/usr/bin/iptables-legacy - priority 10
 follower ip6tables: /usr/bin/ip6tables-legacy
 follower ip6tables-restore: /usr/bin/ip6tables-legacy-restore
 follower ip6tables-save: /usr/bin/ip6tables-legacy-save
 follower iptables-restore: /usr/bin/iptables-legacy-restore
 follower iptables-save: /usr/bin/iptables-legacy-save
/usr/bin/iptables-nft - priority 10
 follower ip6tables: /usr/bin/ip6tables-nft
 follower ip6tables-restore: /usr/bin/ip6tables-nft-restore
 follower ip6tables-save: /usr/bin/ip6tables-nft-save
 follower iptables-restore: /usr/bin/iptables-nft-restore
 follower iptables-save: /usr/bin/iptables-nft-save
Current `best' version is /usr/bin/iptables-legacy.
```

debian
```
# update-alternatives --display iptables
iptables - auto mode
  link best version is /usr/sbin/iptables-nft
  link currently points to /usr/sbin/iptables-nft
  link iptables is /usr/sbin/iptables
  slave iptables-restore is /usr/sbin/iptables-restore
  slave iptables-save is /usr/sbin/iptables-save
/usr/sbin/iptables-legacy - priority 10
  slave iptables-restore: /usr/sbin/iptables-legacy-restore
  slave iptables-save: /usr/sbin/iptables-legacy-save
/usr/sbin/iptables-nft - priority 20
  slave iptables-restore: /usr/sbin/iptables-nft-restore
  slave iptables-save: /usr/sbin/iptables-nft-save
```