Enfore restrictive permissions on /etc/wireguard

This commit is contained in:
angristan 2019-05-24 00:25:48 +02:00
parent 9c9cf66fc8
commit 1981429774
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,8 @@ PublicKey = $SERVER_PUB_KEY
Endpoint = $SERVER_PUB_IP:$SERVER_PORT
AllowedIPs = 0.0.0.0/0,::/0" >> "$HOME/$SERVER_WG_NIC-client.conf"
chmod 600 -R /etc/wireguard/
# Enable routing on the server
echo "net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1" > /etc/sysctl.d/wg.conf