gluon-supernode-docker/wireguard/entry-point.sh

13 lines
336 B
Bash

#!/bin/bash
# remove dns defintion, because resolv.conf is write protected in the container
[ "${WIREGUARD_CONFIG}" ] && \
egrep -v '^\s*DNS\s*=' ${WIREGUARD_CONFIG} >/etc/wireguard/${WIREGUARD_INTERFACE}.conf
wg-quick up ${WIREGUARD_INTERFACE}
nft add rule nat POSTROUTING counter masquerade
while true ; do
sleep 3600
done