:: Re: [DNG] How to turn off the firew…
Forside
Slet denne besked
Besvar denne besked
Skribent: Antony Stone
Dato:  
Til: dng
Emne: Re: [DNG] How to turn off the firewall
On Monday 22 February 2021 at 16:39:12, Federico Fanton via Dng wrote:

> On 22/02/21 16:29, Steve Litt wrote:
> > On a Devuan machine, how do I turn off the firewall entirely, so all
> > ports are accessible? I need to do this for experimentation, not as a
> > permanent thing.
>
> To completely reset the firewall, see this script:
>
> #!/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
>          iptables -t "$table" -P "$REPLY" ACCEPT
>      done
>      iptables -t "$table" -F
>      iptables -t "$table" -X
> done


I do not understand the purpose of $REPLY in that script.

> (from https://gist.github.com/x-yuri/da5de61959ae118900b685fed78feff1 )


No explanation of anything there... :(


Antony.

--
Tax inspectors are just accountants who work for the evil dictators of
democracy.

                                                   Please reply to the list;
                                                         please *don't* CC me.