Ubuntu – How to Disable Firewall on Version 9.04

firewallUbuntu

How can I disable firewall on ubuntu, or how can I check which ports are listening, and how can I add some new ports to be listened to?

Thank you

Best Answer

to see if the firewall is running

> sudo /sbin/iptables -L        
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
> sudo /sbin/iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

if you see anything else in the output except default policies that read ACCEPT then you have a firewall on