29
Oct/08
0

Linux: Reset iptables firewall rules

Create a shell script (iptables_flush.sh) and copy paste the following lines:

#!/bin/sh
echo "Flushing iptables rules..."
sleep 1
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

Make the file executable

chmod +x iptables_flush.sh

and run the script:

./iptables_flush.sh
Share this article
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter
  • LinkedIn

No related posts.

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.