26

Does Ubuntu come with a preinstalled or automatic firewall? If not, do I need one?

I've read some articles about the advantages of Linux over other operating systems about security (no need to have antivirus, ...) but would like to be sure.

19

Ubuntu has a firewall included in the Kernel, and is running by default. What you need to manage this firewall are the iptables. But this are complicated to manage, so you can use UFW (uncomplicated firewall) to configure them. But UFW is still something hard for normal users, so what you can do is install GUFW Install GUFW that is just a graphical front end for UFW.

If you use GUFW, the first time you will see at the bottom of the window 'Disabled Firewall'. But this is not true, your firewall is already running. This enable/disable message refers to the rules set with UFW, not to the firewall.

If you don't believe me open a terminal and write

sudo iptables --list --verbose

Try this with GUFW enabled and disabled. You will see that the only diferences will be the rules you set with GUFW.

alt text

Information from this Ubuntu Forums thread

  • 1
    ”Ubuntu has a firewall included in the Kernel, and is running by default” - yes, but what a lot of people ignore is that ”If you use GUFW, the first time you will see at the bottom of the window 'Disabled Firewall'. But this is not true, your firewall is already running. This enable/disable message refers to the rules set with UFW, not to the firewall.” that makes sense – user47206 Jul 30 '12 at 18:18
  • 1
    this instructive idea is what newbies usually want to hear about firewall in ubuntu. here too: askubuntu.com/a/22668/47206, – user47206 Jul 30 '12 at 18:25
  • without any rules anyone can connect to any server running on your machine, if you have a development environment running on your pc and are connected to a public wifi you dont want anyone anyone to fool around with your test server .. – MADforFUNandHappy Jan 2 '19 at 17:57
  • I am a bit confused by "Ubuntu has a firewall included in the Kernel, and is running by default" since here is claims: "You need to realize that Ubuntu's firewall is not enabled by default. You have to enable it." Am I missing something? – SaTa Jan 21 at 22:34
11

Ubuntu doesn't have a firewall turned on by default in the basic installation.

If you need a firewall, I recommend using gufw to turn it on and manage it:

gufw Install gufw

Gufw is an easy, intuitive, way to manage your Ubuntu firewall, powered by ufw.
It supports common tasks such as allowing or blocking pre-configured services, common P2P, or individual IP/port(s), and many others!

Here is the wiki.

  • 5
    Ubuntu does have a firewall installed. It's ufw. The program gufw is just a GUI front-end. You can you ufw from a terminal. – lamcro Oct 24 '10 at 17:00
  • 2
    lamcro yes i know is installed by default but is disable by default sudo ufw status same happen with iptables is installed but is disable by default sudo iptables -L – hhlp Oct 24 '10 at 17:05
8

it does.

Ubuntu has a firewall called UFW. By default its a command line utility, but there is a gui available -

sudo apt-get install gufw

Once this is installed it can be configured from System -> Administration -> Firewall Configuration.

It should be noted that if your running on a home network behind a router, you router will already be taking care of your firewall concerns.

As a general rule, it is best to only run one firewall at once, so consider switching off your Ubuntu firewall whilst running on your home network.

  • 1
    IT should also be worth noting that UFW comes pre-disabled. "sudo ufw status" – ThePhysician Oct 27 '10 at 0:04
4

The linux kernel itself has a command line accessible firewall that works barebone:

man iptables

This is usually used by the internet service providers, because it is very low on resources, but is very hard to configure (it requires advanced administrator skills).

1

you need a powerful firewall in Linux use iptables

firestarter Install firestater

Firestarter is an Open Source visual firewall program. The software aims to combine ease of use with powerful features, therefore serving both Linux desktop users and system administrators.

We strongly believe that your job is to make the high level security policy decisions and ours is to take care of the underlying details. This is a departure from your typical Linux firewall, which has traditionally required arcane implementation specific knowledge.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy