Browse Source

Add wait for configuration on the concentrator side

pull/1/head
Julien Escario 4 years ago
parent
commit
2090248dc2
  1. 12
      wireguard/deploy-wg-clients.sh

12
wireguard/deploy-wg-clients.sh

@ -1,5 +1,7 @@
#!/bin/bash
# TODO : Render this script POSIX compliant
# This script can be used directly from bash after defining the IP address for the node with :
# IP=x bash <(curl -s https://gitlab.altinea.fr/altinea/install-scripts/raw/branch/master/wireguard/deploy-wg-clients.sh)
@ -31,13 +33,17 @@ AllowedIPs = 172.16.5.0/24, fc00:db8:f00:bebe::/64 # OpenVPN Admin tunnel
Endpoint = vpn.altinea.fr:58212
PersistentKeepalive = 25" > /etc/wireguard/vpnaltinea.conf
# Display the public key to add it on the wireguard concentrator
echo -n "Public key : "
cat /etc/wireguard/keys/public.key
echo "Now you should read https://wiki.altinea.fr/doku.php/wireguard#cote_concentrateur_wireguard"
read -n1 -r -p "Press space only AFTER configuration is done ..."
# Enable and start interface (systemctl needed)
systemctl enable wg-quick@vpnalinea.service && systemctl daemon-reload && systemctl start wg-quick@vpnaltinea
# Run a ping to make the interface usable
ping -c1 192.168.25.1
# Display the public key to add it on the wireguard concentrator
echo -n "Public key : "
cat /etc/wireguard/keys/public.key
exit 0;
Loading…
Cancel
Save