Is the ufw firewall default setting save or not?

Asked by Manes

Hi,

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

Manes

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ufw Edit question
Assignee:
No assignee Edit question
Solved by:
Vojtěch Trefný
Solved:
Last query:
Last reply:
Revision history for this message
Best Vojtěch Trefný (vojtech.trefny) said :
#1

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 -- http://gufw.tuxfamily.org/index.html
Launchpad page -- https://edge.launchpad.net/gui-ufw

Revision history for this message
Deepak Mishra (dpux) said :
#2

download the GUI (Gufw), this will get you what you want.
http://gufw.tuxfamily.org/screenshots.html

Revision history for this message
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

or

sudo ufw default deny

See also :

https://help.ubuntu.com/8.04/serverguide/C/firewall.html

https://help.ubuntu.com/community/Uncomplicated_Firewall_ufw

Revision history for this message
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 https://help.ubuntu.com/8.04/serverguide/C/firewall.html and 'man ufw' for details.

Revision history for this message
Manes (manes-j-deactivatedaccount) said :
#5

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