Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Why is ufw firewall included in Ubuntu, when it is not enabled and pre-configured by default? Most users don't even know it is there, because no GUI frontend is provided.

share|improve this question
2  
I was shocked when I accidentally found out that a firewall is installed but disabled! The arguments mentioned here are pretty weak. –  HRJ Sep 12 '11 at 19:58
add comment

5 Answers 5

In contrast to Microsoft Windows, an Ubuntu desktop does not need a firewall to be safe on the Internet, since by default Ubuntu does not open ports that can introduce security issues.

In general a properly hardened Unix or Linux system will not need a firewall. Firewalls (except of certain security problems with Windows computers) make more sense to block internal networks to the Internet. In this case local computers can communicate with each other over open ports which are blocks towards the outside by the firewall. In this case, the computers are intentionally opened up for internal communications which should not be available outside the internal network.

The standard Ubuntu desktop would not require this, hence ufw is not enabled by default.

share|improve this answer
    
Isn't (g)uwf just a backend? I mean the real firewall is iptables, isn't it? –  papukaija Jan 22 '11 at 0:01
2  
@papukaija frontend you mean? –  8128 Jan 22 '11 at 7:40
4  
Even properly hardened systems will benefit from a firewall. For example, if you run Samba, you open various ports to everyone. With a firwall, you can restrict that to only your server or peers. –  Scaine Jan 22 '11 at 11:32
    
@fluteflute, yes, I meant frontend. –  papukaija Jan 23 '11 at 16:36
2  
[citation needed] –  hexafraction Nov 20 '12 at 0:53
show 1 more comment

Out of the box, Ubuntu ships with no TCP or UDP ports open, hence the belief that there's no reason to run Uncomplicated Firewall (ufw) by default. I agree, though, that having ufw disabled is a strange decision. My reasoning being that inexperienced users are feasibly going to install things like Samba, Apache and such like as they experiment with the system put before them. If they don't understand the implications of this, they will expose themselves to malicious bevaviour on the internet.

Example - I've got my laptop configured with Samba which is fine in my home network protected with WPA2. But if I take my laptop to a Starbucks, I might not think anything of it, but that laptop is now advertising my shares to all and sundry. With a firewall, I can restrict my samba ports to only my home server or peer devices. No need to worry as much now about who might be trying to connect to my laptop. Same goes for VNC, SSH, or a huge number of other useful services my laptop might be running, or trying to connect to.

Ubuntu takes a very on/off approach to certain elements of security, a philosophy I can't agree with. Security might be technically on or off, but by layering elements of security over one another, you end up with a better system. Sure, Ubuntu's security is good enough for a large number of use cases, but not all.

Bottom line, run ufw. Better safe than sorry.

Uncomplicated Firewall has a number of graphical front ends, but the simplest is gufw Install gufw

sudo apt-get install gufw

Here, I'm allowing all traffic to/from OpenDNS, and all samba ports for file sharing.

alt text

share|improve this answer
    
ufw just controls iptables - that's why it's not enabled by default. Advanced users are able to use iptables. –  papukaija Jan 23 '11 at 16:37
3  
@papukaija -- advanced users of iptables are able to use iptables. An advanced user on a bsd system would use pf, but that doesn't make that user, coming to ubuntu, suddenly unsophisticated. Likewise with someone who is primarily a network engineer -- that person would know Cisco or Juniper ACL logic. It's not for everyone, but ufw can make configuration more accessible, and in my opinion this is a good thing. –  belacqua Jan 27 '11 at 20:53
1  
@jgbelacqua: True but the scaine's answer gives an image that ufw is a firewall while it's just a frontend to iptables. –  papukaija Jan 28 '11 at 1:44
add comment

In Ubuntu or any other Linux the firewall is a part of the base system and is called iptables/netfilter. It is always enabled.

iptables consists of a set of rules on what to do and how to behave when a packet if going out of coming in. If you want to explicitly block incoming connections from a specific IP, you will need to add a rule. Actually you don't need to do so. Relax.

If you want good security from anything, remember don't install random softwares from anywhere. It might screw up your default security settings.Don't run as root ever. Always trust the official repos.

I think what you wanted to ask was that if the UI is installed or not?

share|improve this answer
3  
You make it sound like a firewall is "always enabled", which isn't the case. It might be integrated, but unless you turn it on with sudo ufw enable, the first piece of server software you install will open a port that the built-in iptables isn't going to do a thing about. –  Scaine Jan 22 '11 at 11:10
3  
@Scaine: ufw doesn't do the work; it's done by iptables which is enabled by default. –  papukaija Jan 23 '11 at 16:39
3  
Hi guys. UFW is a front end on iptables - I get it. However, by default, iptables does precisely NOTHING. It's not functioning. It's not a firewall. It's ready, but useless. You MUST run sudo ufw enable before a iptables is configured to do anything. Manish, your answer sounds like a firewall is running. You're saying "technically it is" and technically you're right. But it's not doing anything, so you're giving a massively false impression of security where none exists. –  Scaine Jan 24 '11 at 14:57
1  
@manish, regarding "normal users installing server software". Many will install Samba, as per my example. Many others will use the built-in VNC server in preferences/remote desktop. This is fine in the home environment (probably), but take that laptop outside with those services enabled, you're potentially exposing yourself to malicious behaviour. –  Scaine Jan 24 '11 at 14:59
1  
ssh, print-related and mail ports are also frequently opened for completely normal kinds of desktop or server operations. These can be locked down (by source IP for example) or closed completely with ufw or another flavor of firewall/ACL . –  belacqua Jan 27 '11 at 20:45
show 6 more comments

Also, gufw can provide a GUI front-end. (It isn't really more intuitive than ufw on the command line, to me, but it does give you a more visual reminder of what is there.) I agree that the firewall is not advertised well at present. If I were to guess, I'd say this is to prevent new users from shooting themselves in the foot.

share|improve this answer
add comment

It is disabled because the developers really saw no need in reducing functionality. By enabling it by default, you are reducing the possibility of virus malware attacks from about 0.01% to 0.0001% : it just isn't needed. If you really think you need the extra 0.0099% of assurance, great, if you want possibly more functionality, go the other way.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.