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.

So my question is as follows: What command line or configuration in Ubuntu 12.04 can I use to disable or stop the Ubuntu 12.04 default firewall?

share|improve this question
    
one problem per one post please. –  AgentCool Feb 3 '13 at 0:55
1  
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
6  
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
2  
@psusi I recommend posting something like that as an answer. –  Eliah Kagan Feb 3 '13 at 5:38
1  
@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
    
Note that ufw is only one way of configuring a firewall in Ubuntu so this would apply only if this was the method used. –  neon_overload yesterday
    
Also note that ufw is not configured by default to block anything - it is open to the universe until you configure it. –  Thomas W. yesterday

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
1  
you should've commented on the question, not my answer. :/ –  Thomas W. Feb 5 '13 at 22:21

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

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.