diff --git a/wireguard_client.sh b/wireguard_client.sh old mode 100644 new mode 100755 diff --git a/wireguard_server.sh b/wireguard_server.sh index c9cb2e8..5566c07 100644 --- a/wireguard_server.sh +++ b/wireguard_server.sh @@ -5,9 +5,10 @@ if [ "$(id -u)" -ne 0 ]; then exit 1 fi -random_digits=$(LC_ALL=C tr -dc 0-9 > /etc/pf.conf << EOF + +# wireguard pass in on ${interface} pass in inet proto udp from any to any port ${server_port} -pass out on egress inet from (${interface}:network) nat-to (vio0:0) +pass out on egress inet from (${interface}:network) nat-to (${inet_interface}:0) EOF sh /etc/netstart ${interface}