<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>58487</bug_id>
          
          <creation_ts>2026-04-02 16:24:29 +0300</creation_ts>
          <short_desc>Реализовать переключение iptables между xtables-legacy-multi и xtables-nft-multi через alternatives</short_desc>
          <delta_ts>2026-04-03 23:43:22 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>iptables</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="geochip@altlinux.org">geochip</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>284999</commentid>
    <comment_count>0</comment_count>
    <who name="geochip@altlinux.org">geochip</who>
    <bug_when>2026-04-02 16:24:29 +0300</bug_when>
    <thetext>Предлагается реализовать возможность назначать симлинки /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&apos; 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
```</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>