Iptables as you all know is the firewall for linux.Basically its fully command line although there are a few GUI's for it.But mostly everyone uses the command line atleast i am quite comfortable with it.As we dont mess with it always , only at certain times when we need to configure anything.At times we do need to mess up the iptables rules, by either entering the wrong command or the wrong port or the wrong whatever..So it could screw up network traffic at times.Sometimes could totally disconnect or block all internet traffic to your computer, this happens if you mess up with port 80.If you are an iptables expert you could undo the changes by writing a rule which was the opposite of the rule which messed up your configuration.Like replace REJECT with ACCEPT or something.To know about a few important Iptables Commands you could check THIS LINK.But it could get confusing at times, so the safest way is to flush your iptables.Flushing iptables basically removes all the iptable rules you have created so you could start from scratch.Here's how you do it :
All you need to do is Go to the Terminal(Applications->Accessories->Terminal) and type the following commands
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F
sudo iptables -X
Although some people tell you to make a script out of it and then execute it, i feel its not necessary as you wont be flushing your iptables everyday!!.
This should solve your problems incase it was a firewall issue!!
|
7
comments
]
7 comments
I had messed up my iptables while trying to configure internet sharing on my ubuntu box. You have no idea how much this article of yours helped me. thanks a bunch!
Ho man! You saved my life!
Thank you very much! It helped me a lot :-) You saved my night from being sleepless :-)
Glad it helped all of you:)
Thanks Dude
Thank you very much. You saved me
You, you, Life safer, you are legend. iRedmail was somehow messed up IP tables on my Ubuntu Server, so 90% of network applications didn't work.
After entering commands you posted, everything works perfectly. :)
Post a Comment