≡ Menu

Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules

{ 6 comments… add one }
  • Bekir YAPAR July 8, 2010, 8:37 am

    Thx. For help. İt’s helpfull for us.

  • John Jones May 6, 2010, 4:34 pm

    Thanks guy this was really help full, Linux rules

  • Fred November 26, 2009, 3:01 pm

    Silly question, but where should I save this script to in Debian? And how can I run it without having to mention ./location/location/script all the time?

    • Vivek Gite November 28, 2009, 9:29 pm

      You can store it in your own ~/bin directory and add to the PATH in ~/.bash_profile:

      mkdir ~/bin
      cp script ~/bin
      cd ~/bin
      chmod +x script
      echo "export PATH=$PATH:~/bin" >> ~/.bash_profile
      export PATH=$PATH:~/bin
      sudo ~/script
  • Sandeep February 18, 2009, 4:02 am

    Hi Vivek,

    Could you please post a script on iptables rules for a webserver so that instead of APF or CSF you can just run this script daily or as per scheduled with a cron job.

    Thank you

Security: Are you a robot or human?

Leave a Comment