I am running servers on several Pi's for VPN, OpenTTD, etc. I have installed ufw on all of them to try and keep them a little more secure. The server running the VPN is causing some issues as ufw doesn't start after a reboot, even though it is supposedly enabled.
# /etc/ufw/ufw.conf # # 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 # Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'. # See 'man ufw' for details. LOGLEVEL=high
sudo ufw status after a reboot I get:
systemctl status ufw I get:
● ufw.service - Uncomplicated firewall Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2019-03-27 02:06:36 GMT; 4min 46s ago Docs: man:ufw(8) Process: 104 ExecStart=/lib/ufw/ufw-init start quiet (code=exited, status=0/SUCCESS) Main PID: 104 (code=exited, status=0/SUCCESS) CGroup: /system.slice/ufw.service Mar 27 02:06:36 PiVPN systemd: Started Uncomplicated firewall. Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
If I manually disable ufw and then try to re-enable it, I get the following error (The
sudo ufw enable is done after a reboot):
ERROR: problem running ufw-init ip6tables-restore: line 2 failed
I've been struggling with this issue for a while now, so any help would be greatly appreciated. Thanks.
EDIT 01: I have tried running
sudo /usr/share/ufw/check-requirements and after some output, I get a message that
All tests passed.
EDIT 02: I have done a complete re-install of ufw using
sudo apt remove --purge ufw, and after installing it again the problem still persists.