/sbin/ip*tables* symbolic links removed when upgrading from 18.04 to 20.04

Bug #1966133 reported by Steve Buehrle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iptables (Ubuntu)
New
Undecided
Unassigned

Bug Description

When upgraded from Ubuntu 18.04 to Ubuntu 20.04 the symbolic links in /sbin are removed.

Before upgrade

# ls -al /sbin/ip*tables*
lrwxrwxrwx 1 root root 13 Nov 12 2017 /sbin/ip6tables -> xtables-multi
lrwxrwxrwx 1 root root 13 Nov 12 2017 /sbin/ip6tables-restore -> xtables-multi
lrwxrwxrwx 1 root root 13 Nov 12 2017 /sbin/ip6tables-save -> xtables-multi
lrwxrwxrwx 1 root root 13 Nov 12 2017 /sbin/iptables -> xtables-multi
lrwxrwxrwx 1 root root 13 Nov 12 2017 /sbin/iptables-restore -> xtables-multi
lrwxrwxrwx 1 root root 13 Nov 12 2017 /sbin/iptables-save -> xtables-multi

# dpkg -S /sbin/ip*tables*
iptables: /sbin/ip6tables
iptables: /sbin/ip6tables-restore
iptables: /sbin/ip6tables-save
iptables: /sbin/iptables
iptables: /sbin/iptables-restore
iptables: /sbin/iptables-save

After upgrade

# ls -al /sbin/ip*tables*
ls: cannot access '/sbin/ip*tables*': No such file or directory

Revision history for this message
Oibaf (oibaf) wrote :

This is by design, see /usr/share/doc/iptables/NEWS.Debian.gz :

iptables (1.8.4-1) unstable; urgency=medium

    All the iptables binaries have been moved away from /sbin to /usr/sbin.
    Compatibility symlinks were provided during the Buster release, but they
    have been dropped now.
    Please make sure your scripts aren't using hardcoded binary paths.
    .
    Also, please note that iptables is no longer Priority: important. This
    means it is not installed by default in every system. It has been replaced
    by nftables.

 -- Arturo Borrero Gonzalez <email address hidden> Wed, 04 Dec 2019 11:49:00 +0200

Changed in iptables (Ubuntu):
status: New → Incomplete
Revision history for this message
Steve Buehrle (steveb64) wrote :

An install of Ubuntu 20.04 server using the ubuntu-20.04.4-live-server-amd64.iso installs the iptables package and creates links in /sbin. The symbolic links are different, but they are there.

An upgrade should update the symbolic links instead of removing them. Servers that have been upgraded form Ubuntu 18 to Ubuntu 20 have a different behavior than servers that were installed as either Ubuntu 18 or 20.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

# ls -al /sbin/ip*tables*
lrwxrwxrwx 1 root root 27 Feb 23 08:55 /sbin/ip6tables -> /etc/alternatives/ip6tables
lrwxrwxrwx 1 root root 14 Feb 28 2020 /sbin/ip6tables-apply -> iptables-apply
lrwxrwxrwx 1 root root 20 Feb 28 2020 /sbin/ip6tables-legacy -> xtables-legacy-multi
lrwxrwxrwx 1 root root 20 Feb 28 2020 /sbin/ip6tables-legacy-restore -> xtables-legacy-multi
lrwxrwxrwx 1 root root 20 Feb 28 2020 /sbin/ip6tables-legacy-save -> xtables-legacy-multi
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/ip6tables-nft -> xtables-nft-multi
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/ip6tables-nft-restore -> xtables-nft-multi
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/ip6tables-nft-save -> xtables-nft-multi
lrwxrwxrwx 1 root root 35 Feb 23 08:55 /sbin/ip6tables-restore -> /etc/alternatives/ip6tables-restore
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/ip6tables-restore-translate -> xtables-nft-multi
lrwxrwxrwx 1 root root 32 Feb 23 08:55 /sbin/ip6tables-save -> /etc/alternatives/ip6tables-save
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/ip6tables-translate -> xtables-nft-multi
lrwxrwxrwx 1 root root 26 Feb 23 08:55 /sbin/iptables -> /etc/alternatives/iptables
-rwxr-xr-x 1 root root 7057 Feb 28 2020 /sbin/iptables-apply
lrwxrwxrwx 1 root root 20 Feb 28 2020 /sbin/iptables-legacy -> xtables-legacy-multi
lrwxrwxrwx 1 root root 20 Feb 28 2020 /sbin/iptables-legacy-restore -> xtables-legacy-multi
lrwxrwxrwx 1 root root 20 Feb 28 2020 /sbin/iptables-legacy-save -> xtables-legacy-multi
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/iptables-nft -> xtables-nft-multi
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/iptables-nft-restore -> xtables-nft-multi
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/iptables-nft-save -> xtables-nft-multi
lrwxrwxrwx 1 root root 34 Feb 23 08:55 /sbin/iptables-restore -> /etc/alternatives/iptables-restore
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/iptables-restore-translate -> xtables-nft-multi
lrwxrwxrwx 1 root root 31 Feb 23 08:55 /sbin/iptables-save -> /etc/alternatives/iptables-save
lrwxrwxrwx 1 root root 17 Feb 28 2020 /sbin/iptables-translate -> xtables-nft-multi

Oibaf (oibaf)
Changed in iptables (Ubuntu):
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.