This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
gluon-supernode-docker/wireguard/entry-point.sh

13 lines
336 B
Bash
Raw Normal View History

2021-12-07 01:05:27 +00:00
#!/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