Browse Source

Implement -f flag to flush rules

tags/v2.01a1
bbruns 7 years ago
parent
commit
91348d86ba
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      bin/srfirewall

+ 7
- 0
bin/srfirewall View File

@@ -93,6 +93,13 @@ while getopts "hfgv" opt; do
show_version
exit 0
;;
f)
[[ ${EnableIPv4} == "yes" ]] && iptables_rules_flush ipv4
[[ ${EnableIPv6} == "yes" ]] && iptables_rules_flush ipv6
[[ ${EnableIPv6} == "yes" ]] && default_policy_set ipv6 ACCEPT ACCEPT ACCEPT
[[ ${EnableIPv4} == "yes" ]] && default_policy_set ipv4 ACCEPT ACCEPT ACCEPT
exit 0
;;
\?)
echo "Invalid option: -$OPTARG" >&2
;;


Loading…
Cancel
Save