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.

How do I turn off the firewall in Ubuntu 12.04?

Thanks for the answers. The reason for turning it off was twofold: I often cannot make a wireless connectin to internet and get the server is unable to connect message or I get a message that disappears telling me my domain is not compatible with the Avahi network whatever that is. So I thought if I disable firewall I would be ok.

share|improve this question

closed as not a real question by Eric Carvalho, psusi, hhlp, gertvdijk, belacq Feb 4 '13 at 18:26

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

one problem per one post please. –  AgentCool Feb 3 '13 at 0:55
I've removed one of your questions (based on the answer you received). If you still want to ask it, please ask it in a new question. –  iBelieve Feb 3 '13 at 1:26
There isn't a firewall by default ( one is not needed ) so you will have to specify if you set one up, and if you know how to do that, you should know how to undo it. –  psusi Feb 3 '13 at 3:20
@psusi I recommend posting something like that as an answer. –  Eliah Kagan Feb 3 '13 at 5:38
@TheLordofTime "System" means (at least) two things. Do you mean every OS needs a firewall? Not every instance needs a one. As you say, Ubuntu's default firewall rules are permissive--it behaves like netfilter were unloaded from (or not compiled for/into) the kernel. This doesn't seem to cause security problems. Having ports closed when servers don't need to run is at least as effective as a firewall at preventing intrusion. If "stealth" mode is desired, a firewall is handy, but for WAN a NAT router is sufficient, and on LAN even a filtered node's layer 2 presence is often detectable. –  Eliah Kagan Feb 3 '13 at 13:17

3 Answers 3

Actually Ubuntu got a firewall it self named uncomplicated firewall. For any reason you have problem with the firewall means you can simply disable it by running:

sudo ufw disable

from your terminal.

share|improve this answer

sudo iptables -F will flush the firewall rules. You won't be able to turn off the firewall as it is built into the kernel.

share|improve this answer

By default, the firewall on Ubuntu (which can't be removed, because its part of the kernel) is unconfigured, and has default allow on everything. Unless you've added ufw or iptables rules, the firewall (which cannot be disabled because its part of the kernel) will not filter/block anything (Default ALLOW rule).

share|improve this answer
Thi was a real question because of my wireless connection not working properly. –  user126869 Feb 5 '13 at 18:19
you should've commented on the question, not my answer. :/ –  Thomas W. Feb 5 '13 at 22:21

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