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 at centos.org | http://lists.centos.org/mailman/listinfo/centos -- Andrew Rice Jr Systems Analyst Carrier Management Systems, Inc. 500 Chestnut Street, Suite 500 Abilene, TX 79602 USA support: (325) 672-0975 office: (325) 677-5900 fax: (325) 676-0529 http://www.nams.net NAMS III, NAMS 2000 Centralized, NAMS BMX
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
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 at 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.