Is the ufw firewall default setting save or not?

Asked by Manes on 2008-08-02


I installed Ubuntu 8.04 on my computer. I enabled the firewall ufw by "sudo ufw enable". What is the default status of ufw? Is it save or not? Are there any ports open? Can someone access my computer from the Internet? I would like to avoid this.
What do I need to do forbid any access from the Internet? I know there it the command "sudo ufw default deny". Only this doesn't seem to be persistent. I would not like to run it with each log on. How could I make this persistent?

Thanks for your help


Question information

English Edit question
Ubuntu ufw Edit question
No assignee Edit question
Solved by:
Vojtěch Trefný
Last query:
Last reply:

Hi, default status of UFW is to deny all incoming traffic. If you want to create special rules, or just set the firewall, you can use GUFW - graphical interface for UFW -- it's simple and easy.

Homepage --
Launchpad page --

Deepak Mishra (dpux) said : #2

download the GUI (Gufw), this will get you what you want.

bodhi.zazen (bodhi.zazen) said : #3

I hate to post contrary information, but the default status of ufw is permissive :

Also gui tools do not answer the OP question nor do they work on server w/o X, LOL

Check it out for yourself :

sudo ufw enable
sudo iptables -L

To set your default, use

sudo ufw default allow


sudo ufw default deny

See also :

Jamie Strandboge (jdstrand) said : #4

By default the firewall is disabled. If you do 'sudo ufw enable', the firewall is default deny for incoming and default allow for outgoing. Once ufw is enabled, it is saved so subsequent reboots will have it enabled. ufw has a straightforward command line interface for adding rules and changing various settings. Please see and 'man ufw' for details.

Thanks Vojtěch Trefný, that solved my question.