Temporary Reset existing IPTables rules till system reboot

, , Leave a comment


  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