[CentOS] Screwed up my iptables firewall
Barry L. Kline
blkline at attglobal.net
Wed Jan 25 16:38:13 UTC 2006
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.
More information about the CentOS
mailing list