Temporary Reset existing IPTables rules till system reboot

  1. Create a script
    vim /etc/stop_firewall.sh
  2. Copy this inside
    #!/bin/sh
    echo "Reseting 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
  3. Make the file executable
    chmod +x /etc/stop_firewall.sh
  4. Run it
    sh /etc/stop_firewall.sh

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.