mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-06 04:34:19 +01:00
fix quotes
This commit is contained in:
@@ -101,7 +101,7 @@ check_jail_validity() {
|
||||
# function: check if IP is valid
|
||||
check_rdr_ip_validity() {
|
||||
local ip="$1"
|
||||
local ip6=$(echo "${ip}" | grep -E '^(([a-fA-F0-9:]+$)|([a-fA-F0-9:]+\/[0-9]{1,3}$)|SLAAC)')
|
||||
local ip6="$(echo "${ip}" | grep -E '^(([a-fA-F0-9:]+$)|([a-fA-F0-9:]+\/[0-9]{1,3}$)|SLAAC)')"
|
||||
if [ -n "${ip6}" ]; then
|
||||
info "Valid: (${ip6})."
|
||||
else
|
||||
@@ -198,7 +198,7 @@ load_rdr_log_rule() {
|
||||
shift 7;
|
||||
log=$@
|
||||
# Create IPv4 rule with log
|
||||
if [ "${inet} = "ipv4" ] || [ "${inet} = "dual" ]; then
|
||||
if { [ "${inet}" = "ipv4" ] || [ "${inet}" = "dual" ]; }; then
|
||||
if ! ( pfctl -a "rdr/${JAIL_NAME}" -Psn;
|
||||
printf '%s\nrdr pass %s on $%s inet proto %s from %s to %s port %s -> %s port %s\n' "$if" "$log" "${bastille_network_pf_ext_if}" "$proto" "$src" "$dst" "$host_port" "$JAIL_IP" "$jail_port" ) \
|
||||
| pfctl -a "rdr/${JAIL_NAME}" -f-; then
|
||||
@@ -209,7 +209,7 @@ load_rdr_log_rule() {
|
||||
fi
|
||||
fi
|
||||
# Create IPv6 rdr rule with log (if ip6.addr is enabled)
|
||||
if [ -n "$JAIL_IP6" ] && [ "${inet} = "ipv6" ] || [ "${inet} = "dual" ]; then
|
||||
if [ -n "$JAIL_IP6" ] && { [ "${inet}" = "ipv6" ] || [ "${inet}" = "dual" ]; };then
|
||||
if ! ( pfctl -a "rdr/${JAIL_NAME}" -Psn;
|
||||
printf '%s\nrdr pass %s on $%s inet6 proto %s from %s to %s port %s -> %s port %s\n' "$if" "$log" "${bastille_network_pf_ext_if}" "$proto" "$src" "$dst" "$host_port" "$JAIL_IP6" "$jail_port" ) \
|
||||
| pfctl -a "rdr/${JAIL_NAME}" -f-; then
|
||||
|
||||
Reference in New Issue
Block a user