UFW is active but not enabled why?
mateusz@debian:~$ sudo ufw disable
Firewall stopped and disabled on system startup
mateusz@debian:~$ sudo ufw status verbose
Status: inactive
mateusz@debian:~$ sudo ufw enable
ERROR: problem running ufw-init
Even if error occurs, you can check that ufw is running.
mateusz@debian:~$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip
To Action From
-- ------ ----
80/tcp ALLOW IN Anywhere
22/tcp ALLOW IN Anywhere
or
mateusz@debian:~$ sudo service ufw status
[ ok all is running...done.
You can easily set up manually ENABLED=yes
in ufw config
sudo nano /etc/ufw/ufw.conf
which contains:
# /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=no
# Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'.
# See 'man ufw' for details.
LOGLEVEL=low
Setting ENABLED=yes
in /etc/ufw/ufw.conf
did it for me.
$ sudo ufw reload
Firewall not enabled (skipping reload)
$ sudo ufw logging on (showing that @Thomas' solution has no effect for me)
Logging enabled
$ sudo sed -ie 's/ENABLED=no/ENABLED=yes/' /etc/ufw/ufw.conf
Check to be sure that port 22 is enabled before you reload
$ sudo ufw status
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
Reload
$ sudo ufw reload
Firewall reloaded