From c1c300aa21b407351e6045c7b40480d4120db8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Fri, 10 Dec 2021 18:30:32 +0000 Subject: roles: Generate + deploy wireguard configurations --- roles/wireguard/templates/hostname.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 roles/wireguard/templates/hostname.j2 (limited to 'roles/wireguard/templates/hostname.j2') diff --git a/roles/wireguard/templates/hostname.j2 b/roles/wireguard/templates/hostname.j2 new file mode 100644 index 0000000..aca3b03 --- /dev/null +++ b/roles/wireguard/templates/hostname.j2 @@ -0,0 +1,8 @@ +inet 10.10.0.1 255.255.255.0 +inet6 fd00:10:10::1 +#!/usr/local/bin/wireguard-go -f tun0 & +!/usr/local/bin/wg setconf tun0 /etc/wireguard/{{ global.dcontroller }}.conf +!/bin/sleep 2 +!/sbin/route add -inet 10.10.0.0/24 10.10.0.1 +!/bin/sleep 2 +!/sbin/route add -inet6 fd00:10:10::/64 fd00:10:10::1 -- cgit v1.2.3