On latest Ubuntu 18.04 I have an inconsistent state of ufw on reboots (sometimes even ssh doesn't work): root@us-proxy1:~# uname -a Linux us-proxy1 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux root@us-proxy1:~# dpkg -l |grep ufw ii ufw 0.35-5 all program for managing a Netfilter firewall
When I login via console, 'ufw status' looks ok, but still not all services work. 'systemctl status ufw is FAILED'. Restarting the Firewall solves the issue, but always logging into a server via console if ssh doesn't work is not acceptable. I will try the workaround mentioned above. Errors always happen on COMMIT of ruleset: root@us-proxy1:~# journalctl -u ufw.service -- Logs begin at Thu 2018-07-19 13:09:26 UTC, end at Mon 2018-07-23 08:27:50 UTC. -- Jul 19 13:09:27 guest systemd[1]: Started Uncomplicated firewall. -- Reboot -- Jul 19 14:12:46 us-proxy1 ufw-init[415]: iptables-restore: line 77 failed Jul 19 14:12:47 us-proxy1 ufw-init[415]: Problem running '/etc/ufw/before.rules' Jul 19 14:12:47 us-proxy1 systemd[1]: ufw.service: Main process exited, code=exited, status=1/FAILURE Jul 19 14:12:47 us-proxy1 systemd[1]: ufw.service: Failed with result 'exit-code'. Jul 19 14:12:47 us-proxy1 systemd[1]: Failed to start Uncomplicated firewall. -- Reboot -- Jul 19 14:54:06 us-proxy1 ufw-init[421]: iptables-restore: line 44 failed Jul 19 14:54:07 us-proxy1 ufw-init[421]: Problem running '/etc/ufw/user.rules' Jul 19 14:54:07 us-proxy1 systemd[1]: ufw.service: Main process exited, code=exited, status=1/FAILURE Jul 19 14:54:07 us-proxy1 systemd[1]: ufw.service: Failed with result 'exit-code'. Jul 19 14:54:07 us-proxy1 systemd[1]: Failed to start Uncomplicated firewall. Jul 19 15:09:51 us-proxy1 systemd[1]: Starting Uncomplicated firewall... Jul 19 15:09:51 us-proxy1 ufw-init[1985]: Firewall already started, use 'force-reload' Jul 19 15:09:51 us-proxy1 systemd[1]: Started Uncomplicated firewall. -- Reboot -- Jul 19 15:21:17 us-proxy1 ufw-init[413]: ip6tables-restore: line 138 failed Jul 19 15:21:17 us-proxy1 ufw-init[413]: Problem running '/etc/ufw/before6.rules' Jul 19 15:21:17 us-proxy1 systemd[1]: ufw.service: Main process exited, code=exited, status=1/FAILURE Jul 19 15:21:17 us-proxy1 systemd[1]: ufw.service: Failed with result 'exit-code'. Jul 19 15:21:17 us-proxy1 systemd[1]: Failed to start Uncomplicated firewall. Jul 19 15:22:29 us-proxy1 systemd[1]: Starting Uncomplicated firewall... Jul 19 15:22:29 us-proxy1 ufw-init[1424]: Firewall already started, use 'force-reload' -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ufw in Ubuntu. https://bugs.launchpad.net/bugs/1726856 Title: ufw does not start automatically at boot Status in ufw: Triaged Status in ufw package in Ubuntu: Triaged Status in ufw source package in Xenial: Triaged Status in ufw source package in Artful: Triaged Status in ufw source package in Bionic: Triaged Status in ufw source package in Cosmic: Triaged Bug description: Whenever I boot into 17.10 ufw is always inactive, even though /etc/ufw/ufw.conf has this: # Set to yes to start on boot. If setting this remotely, be sure to add a rule # to allow your remote connection before starting ufw. Eg: 'ufw allow 22/tcp' ENABLED=yes ProblemType: Bug DistroRelease: Ubuntu 17.10 Package: ufw 0.35-5 ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4 Uname: Linux 4.13.0-16-generic x86_64 ApportVersion: 2.20.7-0ubuntu3 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Tue Oct 24 13:56:40 2017 InstallationDate: Installed on 2015-04-01 (936 days ago) InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2) PackageArchitecture: all SourcePackage: ufw UpgradeStatus: Upgraded to artful on 2017-10-24 (0 days ago) mtime.conffile..etc.default.ufw: 2015-06-17T22:01:02.089170 To manage notifications about this bug go to: https://bugs.launchpad.net/ufw/+bug/1726856/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp