diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-10 18:30:32 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-10 21:52:55 +0000 |
commit | c1c300aa21b407351e6045c7b40480d4120db8a7 (patch) | |
tree | 48ac6715e649326d02dad7011b31c091db29b7b3 /roles/wireguard/templates/hostname.j2 | |
parent | 2fe1965dbb4cc650fda2b00e69219ac7ae403674 (diff) | |
download | rules-c1c300aa21b407351e6045c7b40480d4120db8a7.tar.gz |
roles: Generate + deploy wireguard configurations
Diffstat (limited to 'roles/wireguard/templates/hostname.j2')
-rw-r--r-- | roles/wireguard/templates/hostname.j2 | 8 |
1 files changed, 8 insertions, 0 deletions
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 |