- 
      
- 
        Save amdprophet/07b7466e420aa92e5dc16d7bc30fcaac to your computer and use it in GitHub Desktop. 
Revisions
- 
        x-yuri revised this gist Jun 29, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -eu declare -A chains=( [filter]=INPUT:FORWARD:OUTPUT [raw]=PREROUTING:OUTPUT [mangle]=PREROUTING:INPUT:FORWARD:OUTPUT:POSTROUTING [security]=INPUT:FORWARD:OUTPUT [nat]=PREROUTING:INPUT:OUTPUT:POSTROUTING ) for table in "${!chains[@]}"; do echo "${chains[$table]}" | tr : $"\n" | while IFS= read -r; do 
- 
        x-yuri created this gist Jun 29, 2019 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/usr/bin/env bash set -eu declare -A chains=( [raw]=PREROUTING:OUTPUT [mangle]=PREROUTING:INPUT:FORWARD:OUTPUT:POSTROUTING [security]=INPUT:FORWARD:OUTPUT [nat]=PREROUTING:INPUT:OUTPUT:POSTROUTING [filter]=INPUT:FORWARD:OUTPUT ) for table in "${!chains[@]}"; do echo "${chains[$table]}" | tr : $"\n" | while IFS= read -r; do iptables -t "$table" -P "$REPLY" ACCEPT done iptables -t "$table" -F iptables -t "$table" -X done