Reset firewall to install defaults.

Support for security such as Firewalls and securing linux
Post Reply
just1coder
Posts: 4
Joined: 2007/04/19 12:54:26

Reset firewall to install defaults.

Post by just1coder » 2007/04/30 22:15:47

I'm pretty sure I screwed up my install - I can't SSH into a CentOS 4.4 Server box remotely, open up a TCP:80...

Is there any way to reset the firewall - I still thankfully have physical access.

just1coder
Posts: 4
Joined: 2007/04/19 12:54:26

Re: Reset firewall to install defaults.

Post by just1coder » 2007/04/30 22:17:18

- selinux is disabled
- iptables is stopped

michaelnel
Posts: 1478
Joined: 2006/05/29 16:50:11
Location: San Francisco, CA

Reset firewall to install defaults.

Post by michaelnel » 2007/04/30 22:30:51

You could always "yum remove iptables; yum install iptables" to get back to "as installed" status. Then do "chkconfig iptables on; service iptables restart". Pretty heavy handed, and there may be a more elegant way, but this "stone axe" approach will work.

This time before screwing around with it, "cp /etc/sysconfig/iptables /etc/sysconfig/iptables.DIST" immediately after reinstalling it.

Or, post your /etc/sysconfig/iptables file here and tell us what you want the firewall to do and what it isn't doing now.

Post Reply

Return to “CentOS 4 - Security Support”