{"id":10479,"date":"2025-04-28T16:46:40","date_gmt":"2025-04-28T20:46:40","guid":{"rendered":"https:\/\/www.both.org\/?p=10479"},"modified":"2025-05-09T06:29:53","modified_gmt":"2025-05-09T10:29:53","slug":"beware-fedora-updates-of-april-28-2024","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=10479","title":{"rendered":"Beware Fedora updates of April 28, 2025"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"10479\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">1    <\/span>\r\n<\/div><\/div>\n<h2 class=\"wp-block-heading\">It breaks iptables with no warning<\/h2>\n\n\n\n<p>I&#8217;m rather angry right now but I promise to remain calm &#8212; at least in this post. <\/p>\n\n\n\n<p>I just finished installing Fedora updates today and a couple packages relating to IPTables were installed. Actually the iptables packages were removed and iptables-legacy  packages were installed. In combination with the merge of \/sbin and \/usr\/sbin, and some other file location changes, all of my IPTables firewalls stopped working when I rebooted my firewall and server systems. <\/p>\n\n\n\n<p>The problems manifested as inability to communicate with the outside world &#8212; and presumably for the outside world to be unable to send email to Both.org or access the Both.org website. It only took me a couple minutes to determine that the firewall was not running because I got an error message indicating that the iptables-save and iptables commands weren&#8217;t present. <\/p>\n\n\n\n<p><strong>WHAT!!??<\/strong><\/p>\n\n\n\n<p>The firewall is responsible for determining packet routing on the system I use as the firewall and router. Without the firewall rules, routing in or out doesn&#8217;t work. That&#8217;s one of the clues I used to determine the source of the problem. But that wasn&#8217;t the root cause. <\/p>\n\n\n\n<p>A quick look at the \/sbin directory showed me the following. This is what the iptables symlinks looked like after the morning updates. The links all contain the &#8220;-legacy&#8221; insertion so the systemd service unit couldn&#8217;t find the tools needed to start iptables. I did check \/etc\/sysconfig\/iptables to ensure it was still there and unchanged &#8212; it was OK. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>cd \/sbin<\/strong>\n&#91;root@yorktown sbin]# <strong>ll ipt*<\/strong>\nlrwxrwxrwx. 1 root root     21 Apr 16 11:24 iptables-apply -> ..\/bin\/iptables-apply\nlrwxrwxrwx. 1 root root     22 Apr 16 11:24 iptables-legacy -> ..\/bin\/iptables-legacy\nlrwxrwxrwx. 1 root root     30 Apr 16 11:24 iptables-legacy-restore -> ..\/bin\/iptables-legacy-restore\nlrwxrwxrwx. 1 root root     27 Apr 16 11:24 iptables-legacy-save -> ..\/bin\/iptables-legacy-save\nlrwxrwxrwx. 1 root root     19 Apr 16 11:22 iptables-nft -> ..\/bin\/iptables-nft\nlrwxrwxrwx. 1 root root     27 Apr 16 11:22 iptables-nft-restore -> ..\/bin\/iptables-nft-restore\nlrwxrwxrwx. 1 root root     24 Apr 16 11:22 iptables-nft-save -> ..\/bin\/iptables-nft-save\nlrwxrwxrwx. 1 root root     33 Apr 16 11:22 iptables-restore-translate -> ..\/bin\/iptables-restore-translate\nlrwxrwxrwx. 1 root root     25 Apr 16 11:22 iptables-translate -> ..\/bin\/iptables-translate\n-rwxr-xr-x. 1 root root 203360 Jul 17  2024 iptraf-ng\nlrwxrwxrwx. 1 root root     15 Apr 16 11:22 iptstate -> ..\/bin\/iptstate\nlrwxrwxrwx. 1 root root     15 Apr 16 11:24 iptunnel -> ..\/bin\/iptunnel<\/code><\/pre>\n\n\n\n<p>Compare the above to this look at the previous set of links in \/sbin. There&#8217;s quite a bit of difference.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># ll ipt*\nlrwxrwxrwx. 1 root root    26 Apr  9 08:06 iptables -> \/etc\/alternatives\/iptables\nlrwxrwxrwx. 1 root root    17 Jan 16 19:00 iptables-nft -> xtables-nft-multi\nlrwxrwxrwx. 1 root root    17 Jan 16 19:00 iptables-nft-restore -> xtables-nft-multi\nlrwxrwxrwx. 1 root root    17 Jan 16 19:00 iptables-nft-save -> xtables-nft-multi\nlrwxrwxrwx. 1 root root    34 Apr  9 08:06 iptables-restore -> \/etc\/alternatives\/iptables-restore\nlrwxrwxrwx. 1 root root    17 Jan 16 19:00 iptables-restore-translate -> xtables-nft-multi\nlrwxrwxrwx. 1 root root    31 Apr  9 08:06 iptables-save -> \/etc\/alternatives\/iptables-save\nlrwxrwxrwx. 1 root root    17 Jan 16 19:00 iptables-translate -> xtables-nft-multi\n-rwxr-xr-x. 1 root root 34248 Jan 16 19:00 iptc\n-rwxr-xr-x. 1 root root 87456 Mar 17 20:00 iptstate\n-rwxr-xr-x. 1 root root 24264 Jan 16 19:00 iptunnel<\/code><\/pre>\n\n\n\n<p>The fix is rather easy. I just used the following commands to create the links I needed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cd \/sbin\n# ln -s iptables-legacy iptables\n# ln -s iptables-legacy-restore iptables-restore\n# ln -s iptables-legacy-save iptables-save\n# systemctl restart iptables.service<\/code><\/pre>\n\n\n\n<p>The new links are now available for the SysAdmin (me) and systemd to use. I also restarted fail2ban to ensure that all the blocking entries were added to the firewall. If you&#8217;re not using fail2ban you don&#8217;t need to do that.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n# ll ipt*\n<strong>lrwxrwxrwx. 1 root root     15 Apr 28 15:06 iptables -> iptables-legacy<\/strong>\nlrwxrwxrwx. 1 root root     21 Apr 17 15:53 iptables-apply -> ..\/bin\/iptables-apply\nlrwxrwxrwx. 1 root root     22 Apr 17 15:53 iptables-legacy -> ..\/bin\/iptables-legacy\nlrwxrwxrwx. 1 root root     30 Apr 17 15:53 iptables-legacy-restore -> ..\/bin\/iptables-legacy-restore\nlrwxrwxrwx. 1 root root     27 Apr 17 15:53 iptables-legacy-save -> ..\/bin\/iptables-legacy-save\nlrwxrwxrwx. 1 root root     19 Apr 17 15:50 iptables-nft -> ..\/bin\/iptables-nft\nlrwxrwxrwx. 1 root root     27 Apr 17 15:50 iptables-nft-restore -> ..\/bin\/iptables-nft-restore\nlrwxrwxrwx. 1 root root     24 Apr 17 15:50 iptables-nft-save -> ..\/bin\/iptables-nft-save\n<strong>lrwxrwxrwx. 1 root root     23 Apr 28 15:06 iptables-restore -> iptables-legacy-restore<\/strong>\nlrwxrwxrwx. 1 root root     33 Apr 17 15:50 iptables-restore-translate -> ..\/bin\/iptables-restore-translate\n<strong>lrwxrwxrwx. 1 root root     20 Apr 28 15:06 iptables-save -> iptables-legacy-save<\/strong>\nlrwxrwxrwx. 1 root root     25 Apr 17 15:50 iptables-translate -> ..\/bin\/iptables-translate\n-rwxr-xr-x. 1 root root 203360 Jul 17  2024 iptraf-ng\nlrwxrwxrwx. 1 root root     15 Apr 17 15:50 iptstate -> ..\/bin\/iptstate\nlrwxrwxrwx. 1 root root     15 Apr 17 15:51 iptunnel -> ..\/bin\/iptunnel<\/code><\/pre>\n\n\n\n<p>A bit of testing verified that all was once again working as it should. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A short rant<\/h2>\n\n\n\n<p>I am furious that this occurred. There is absolutely no reason for it. Fortunately, my systems weren&#8217;t open without a firewall for very long, but it takes only a few microseconds to infect a computer that&#8217;s unprotected.<\/p>\n\n\n\n<p>I much prefer IPTables for my use case and it&#8217;s easier and faster to work with than NFTables or firewalld, neither of which I like in the least. It&#8217;s not that they don&#8217;t work, but both are obscure and firewalld is way too complex &#8212; for my use cases.<\/p>\n\n\n\n<p>Although IPTables is no longer the default firewall front-end, I never expected that it was going to be disabled by incompetence (the nicest word I can think of at the moment). Clearly it&#8217;s intended to continue as a legacy tool but apparently someone failed to perform simple tests to see if it would still work after the updates were installed. Changes like this should be transparent in their application but loud in the announcement of their coming and that they&#8217;ve been implemented. <\/p>\n\n\n\n<p>And they should damn well be thoroughly tested.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 It breaks iptables with no warning I&rsquo;m rather angry right now but I promise to remain calm<\/p>\n","protected":false},"author":2,"featured_media":2706,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[756,71,5,75,682],"tags":[261],"class_list":["post-10479","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fail","category-fedora","category-linux","category-security","category-updates","tag-security"],"modified_by":"David Both","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/10479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10479"}],"version-history":[{"count":10,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/10479\/revisions"}],"predecessor-version":[{"id":10615,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/10479\/revisions\/10615"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/2706"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}