diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-11-26 04:09:46 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:50:53 +0200 |
commit | fd7e94a34b7fa9151d689375d8687d3686786d9b (patch) | |
tree | 643f4918e97e68adb5d502909b0e463de6907025 /roles/common/files/usr | |
parent | b6a2e86d811f2823daa42d9d7b78dd6702821a04 (diff) |
Reformulate the headers showing the license.
To be clearer, and to follow the recommendation of the FSF, we include
a full header rather than a single sentence.
Diffstat (limited to 'roles/common/files/usr')
-rwxr-xr-x | roles/common/files/usr/local/sbin/update-firewall.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/roles/common/files/usr/local/sbin/update-firewall.sh b/roles/common/files/usr/local/sbin/update-firewall.sh index 41407e8..4050e9e 100755 --- a/roles/common/files/usr/local/sbin/update-firewall.sh +++ b/roles/common/files/usr/local/sbin/update-firewall.sh @@ -1,42 +1,52 @@ #!/bin/bash -# + # Create iptables (v4 and v6) rules. Unless one of [-f] or [-c] is # given, or if the ruleset is unchanged, a confirmation is asked after # loading the new rulesets; if the user answers No or doesn't answer, # the old ruleset is restored. If the user answer Yes (or if the flag # [-f] is given), the new ruleset is made persistent (requires a pre-up # hook) by moving it to /etc/iptables/rules.v[46]. # # The [-c] flag switch to dry-run (check) mode. The rulesets are not # applied, but merely checked against the existing ones. The return # value is 0 iff. they do not differ. # # This firewall is only targeted towards end-servers, not gateways. In # particular, there is no NAT'ing at the moment. # # Dependencies: netmask(1) # -# Copyright 2013 Guilhem Moulin <guilhem@fripost.org> +# Copyright © 2013 Guilhem Moulin <guilhem@fripost.org> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -# Licensed under the GNU GPL version 3 or higher. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. set -ue PATH=/usr/sbin:/usr/bin:/sbin:/bin timeout=10 force=0 check=0 verbose=0 addrfam= secmark=0xA99 # must match that in /etc/network/if-up.d/ipsec secproto=esp # must match /etc/ipsec.conf; ESP is the default (vs AH/IPComp) fail2ban_re='^(\[[0-9]+:[0-9]+\]\s+)?-A fail2ban-\S' IPSec_re=" -m policy --dir (in|out) --pol ipsec --reqid [0-9]+ --proto $secproto -j ACCEPT$" declare -A rss=() tables=() usage() { cat >&2 <<- EOF Usage: $0 [OPTIONS] |