Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Is it safe to connect a computer running a freshly installed ubuntu desktop edition directly to the internet? Or do I need to actively configure a firewall before connecting it?

share|improve this question
to the best of my memory, desktop default doesn't have network aware services other than avahi and dhclient running out of the box...but more security would be "better" imho – RobotHumans Dec 4 '10 at 13:15
up vote 3 down vote accepted

You can tell what the currently running firewall rules are by running:

sudo iptables-save

If this doesn't print anything, which it doesn't on my recently installed Ubuntu 10.10 system, then no firewall is in place. Do you absolutely need a firewall? Probably not, particularly if you keep up to date with software updates. However, I would recommend enabling it. The tool you probably want to use is called "ufw", and you can enable it with:

sudo ufw enable

Once you do that, the iptables-save command above should display 50 lines or so of information. If you have any services you need particularly to allow, such as HTTP, you can allow it with:

sudo ufw enable 80/tcp

This would be if you wanted to be able to access the web server on your machine.

For most users on a workstation, the default setting will be good.

share|improve this answer

I think it is safe enough. Though firewall doesn't run by default like Windows, but Linux/Unix system always requires superuser/root permission to make change to its system, e.g. opening a network port or even just installing new software.

You don't need firewall as long as your OS (whether it's Windows or Linux) doesn't open up network ports which has security holes or backdoor. Windows needs personal firewall because there are so many malicious software out there that will opening up malicious backdoor ports once it is installed, so firewall is there to act as a protection against that.

share|improve this answer
Ratanachai - please see my comment, as your points just aren't true. – Rory Alsop Dec 7 '10 at 15:55
OK, I changed from "Yes, it is safe" to "I think it is safe enough". BTW, what port does a freshly installed ubuntu desktop open anyway? – Ken Ratanachai S. Dec 9 '10 at 13:41

No it categorically isn't safe! Sure, if an OS has no holes then it would be fine as Ratanachai says, however all operating systems and applications have holes. And although Microsoft operating systems are the most targeted, a standard Ubuntu install has vulnerabilities that are known, as well as other unknown ones (probably) and depending on the applications you run you could have a large number of possible vulnerabilities which can be exploited if your machine is not firewalled from the Internet.

You should always build your OS in as secure an environment as you can - so if you are downloading packages from the Internet, at least firewall it so you are only getting responses, not direct targeted scans/exploits etc.

Once you have installed, then harden your platform - follow all security advisories and patches, turn off all unneeded services and lock down access (ie deny root access from remote)

That will at least leave you with a basic level of security.

share|improve this answer

Your Answer


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.