PDA

View Full Version : [SOLVED] How can i go back to default iptables settings in Ubuntu?I'm running Ubuntu 9.04 and


judoka1113
August 16th, 2009, 02:58 AM
I'm running Ubuntu 9.04 and started messing around with my firewall, it got a little too complecated for me, so I just would like to be able to somehow restore the default iptables setting. Any idea how I can do this? And since I installed some programs already if I do $ iptables -F won't it put my system in jeopardy since some port could have been unblocked as a result of installing some packages?

HermanAB
August 16th, 2009, 12:05 PM
If you are not running FTP or VNC servers, then your system will be OK after iptables -F. Since the demise of telnet, those two are the main hacking culprits.

dfreer
August 16th, 2009, 10:02 PM
I'm pretty sure there are no default ubuntu firewall settings: or phrased differently, the default setting is blank (all traffic accepted). However, there is also no default installed programs that listen on incoming ports (excepting the loopback adapter).

So flushing your iptables is safe as long as you didn't install any programs that listen to incoming ports. Beyond that though, why not just remove your PC from the network before doing all this, secure your firewall, then reconnect?

donato roque
September 3rd, 2009, 05:54 AM
I'm posting my question in this thread because I have a related question. I have a regular Ubuntu 9.04 desktop (homeuser) but I have used several tools to configure iptables like firestarter and gufw. I made a couple of rules using the gui and I also want to go back to the default state of the iptables. Do I just delete the rules using the gui? Is deleting the rules (using gufw) the same as 'iptables -F'?

automaton26
September 3rd, 2009, 06:00 AM
sudo ufw disable
sudo ufw default deny
sudo ufw enable
sudo ufw status

(I think)