Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to setup a firewall in my Ubuntu 12.04 machine. After some struggling I got the following. Isn't this sounds a bit odd?

thomas@thomas-K40IJ:~$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
21/tcp                     ALLOW OUT   Anywhere
80                         ALLOW OUT   Anywhere
22                         ALLOW OUT   Anywhere
21/tcp                     ALLOW OUT   Anywhere (v6)
80                         ALLOW OUT   Anywhere (v6)
22                         ALLOW OUT   Anywhere (v6)

thomas@thomas-K40IJ:~$ sudo ufw reload
Firewall not enabled (skipping reload)
thomas@thomas-K40IJ:~$ sudo ufw enable 
ERROR: Could not load logging rules
thomas@thomas-K40IJ:~$

Also my firewall seems disabled after reboot. What am I missing?

share|improve this question
1  
Turning off the logging(sudo ufw logging off) solved the problem. – Thomas May 2 '13 at 13:38
    
Use the GUFW graphical user interface for UFW (Uncomplicated Firewall) it is easier... – Prasad RD May 2 '13 at 14:28
up vote 8 down vote accepted
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
share|improve this answer

ufw has a graphical interface that could help you setup the firewall easier. It should be installed by default, but if you don't have it, do that with sudo apt-get install gufw.
Here is a guide on its usage https://help.ubuntu.com/community/Gufw

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .