I have a server that I screwed up iptables on. Now when the server restarts it locks up trying to apply the firewall rules.
How can I remove the rules (set to all ACCEPT) in a linux rescue mode or knoppix or other way of getting to the file system?
Any suggestions how to fix this?
Thanks, James
Have you tried to reboot it into single user mode and just doing an iptables -F to flush out all the rules?
| I have a server that I screwed up iptables on. Now when the server | restarts it locks up trying to apply the firewall rules. | | How can I remove the rules (set to all ACCEPT) in a linux rescue mode or | knoppix or other way of getting to the file system? | | Any suggestions how to fix this? | | Thanks, | James | | _______________________________________________ | CentOS mailing list | CentOS@centos.org | http://lists.centos.org/mailman/listinfo/centos
James Pifer wrote:
I have a server that I screwed up iptables on. Now when the server restarts it locks up trying to apply the firewall rules.
How can I remove the rules (set to all ACCEPT) in a linux rescue mode or knoppix or other way of getting to the file system?
Any suggestions how to fix this?
Thanks, James
I think this can work: you press 'I' key to enter the interactive mode at startup, here you can abort the launch of the iptable service. kfx.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
James Pifer wrote:
I have a server that I screwed up iptables on. Now when the server restarts it locks up trying to apply the firewall rules.
How can I remove the rules (set to all ACCEPT) in a linux rescue mode or knoppix or other way of getting to the file system?
Any suggestions how to fix this?
Those rules are stored in /etc/sysconfig/iptables, so you have some choices:
1) Boot into rescue mode, then do /sbin/service iptables stop, then exit to boot the system normally. You'll have no firewall at this point. Create the rules as you want them (with iptables command), then do an /sbin/service iptables save to fix the file.
2) Boot into rescue mode, then edit /etc/sysconfig/iptables to make the firewall what you wanted in the first place, then exit to boot normally.
On Wed, 2006-01-25 at 11:38 -0500, Barry L. Kline wrote:
James Pifer wrote:
I have a server that I screwed up iptables on. Now when the server restarts it locks up trying to apply the firewall rules.
How can I remove the rules (set to all ACCEPT) in a linux rescue mode or knoppix or other way of getting to the file system?
Any suggestions how to fix this?
Those rules are stored in /etc/sysconfig/iptables, so you have some choices:
- Boot into rescue mode, then do /sbin/service iptables stop, then exit
to boot the system normally. You'll have no firewall at this point. Create the rules as you want them (with iptables command), then do an /sbin/service iptables save to fix the file.
- Boot into rescue mode, then edit /etc/sysconfig/iptables to make the
firewall what you wanted in the first place, then exit to boot normally.
Thanks for the quick responses. Combination of interactive and then correcting the rules and saving did the trick.
James