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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1726856

Title:
  ufw does not start automatically at boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ufw/+bug/1726856/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to