Portal Home > Knowledgebase > Articles Database > Need Help Fixing Firewall
Need Help Fixing Firewall
Posted by xenexprime, 03-08-2014, 03:10 PM |
Hello Guys,
I ran the command " iptables -F " and my Iptables flushed and it broke my Firewall locking me out of my box, now I have an unmanaged VPS but the host disabled the firewall as supposedly that's all they could do.
So once I regained access I removed Iptables and reinstalled it but that broke my access again, so I am wondering what suggestion anyone has to fix this.
This is what I got from my host before they disabled my firewall:
I would really appreciate any input.
Specs: centos-6.4-amd64-minimal, had CSF running smoothly, Running Zpanel Control Panel, 6gb Ram, 2TB Bandwidth, 30GB SSD HDD (Can't give you more as right now am locked out of box )
Last edited by xenexprime; 03-08-2014 at 03:21 PM.
|
Posted by edigest, 03-08-2014, 03:22 PM |
You should be wary about running commands from the command-line unless you know what they do. For example, if you created a bunch of policies or chains and then ran 'iptables -F' you flushed (deleted) everything that came before.
Here is a start at understanding iptables:
http://www.cyberciti.biz/tips/linux-...-examples.html
|
Posted by xenexprime, 03-08-2014, 03:27 PM |
Yes I am going over it right now, saw you posted it on another thread thanks.
I usually am careful but I was doing a project for a college class and was in a rush and you know how that goes, being cautious goes out the window, but I definitely learned my lesson.
Thanks again, just gonna wait for my host to disable the firewall again and see what I can do.
|
Posted by madaboutlinux, 03-09-2014, 02:57 AM |
As stated by your host, the default policy of your iptables chains is set to DROP i.e.
The default firewall rules allow you to SSH in, but as soon as you flush those rules using iptables -F, only thing remaining is DROP for all the 3 chains which then block every incoming and outgoing connections.
If you don't need the firewall, first change the policy from DROP to ACCEPT
Save the changes
It is now safe to flush the rules. Your server is now open to all connections.
|
Posted by eth00, 03-09-2014, 03:08 PM |
Another quick way to fully turn off the firewall on centos/redhat is to do a service iptables stop.
|
Add to Favourites Print this Article
Also Read