From 6f7a3426dd6b7a6184b98c9f28f7eba750dc96a0 Mon Sep 17 00:00:00 2001 From: Jordan Potter Date: Sat, 6 Mar 2021 22:48:51 -0600 Subject: [PATCH] Add log statement when LOCAL_NETWORK specified --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 08d5bd5..39fb1e5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -31,13 +31,14 @@ iptables -I OUTPUT ! -o $interface -m mark ! --mark $(wg show $interface fwmark) docker6_network="$(ip -o addr show dev eth0 | awk '$3 == "inet6" {print $4}')" if [[ -z "$docker6_network" ]]; then - echo "Skipping ipv6 killswitch setup since ipv6 interface was not found..." >&2 + echo "Skipping ipv6 kill switch setup since ipv6 interface was not found" >&2 else docker6_network_rule=$([ ! -z "$docker6_network" ] && echo "! -d $docker6_network" || echo "") ip6tables -I OUTPUT ! -o $interface -m mark ! --mark $(wg show $interface fwmark) -m addrtype ! --dst-type LOCAL $docker6_network_rule -j REJECT fi if [[ "$LOCAL_NETWORK" ]]; then + echo "Allowing traffic to local network ${LOCAL_NETWORK}" >&2 ip route add $LOCAL_NETWORK via $default_route_ip iptables -I OUTPUT -d $LOCAL_NETWORK -j ACCEPT fi