5 Commits

4 changed files with 14 additions and 3 deletions

View File

@@ -13,7 +13,9 @@ include wg.mk
.PHONY: check
check: ## Check you have all dependencies
@command -v graph-easy >/dev/null || { echo "Install perl-graph-easy" && exit 1 ;}
@command -v ansible >/dev/null || { echo "Install ansible" && exit 1 ;}
@command -v recsel >/dev/null || { echo "Install recutils" && exit 1 ;}
@command -v wg >/dev/null || { echo "Install wireguard" && exit 1 ;}
@command -v lowdown >/dev/null || { echo "Install lowdown" && exit 1 ;}
@echo "All dependencies installed"

View File

@@ -14,6 +14,7 @@
ansible.builtin.copy:
src: wireguard/wg0.conf
dest: /etc/wireguard/wg0.conf
notify: Reload systemd daemon
- name: Get server public IP
ansible.builtin.command: dig +short myip.opendns.com @resolver1.opendns.com
@@ -30,3 +31,8 @@
name: wg-quick@wg0
enabled: yes
handlers:
- name: Reload systemd daemon
ansible.builtin.command:
cmd: systemctl daemon-reload

View File

@@ -13,3 +13,7 @@ pubkey: loNnXRalD0ZyOLadSWm31rqOuRfEbgtX9O4/z7eSIho=
id: 3
name: coja
pubkey: snfw8r1hIAtTABGd7K9xIZ9RH62qMEK4fRqVm4EbniQ=
id: 4
name: netstat
pubkey: Z8bk25hHo6oadOX7KtoLUDXGW9r+thMiR320aiGmQAQ=

View File

@@ -1,12 +1,11 @@
# Client configuration for wireguard to nimbus at xecut.
[Interface]
Address = 10.0.0.2/32
Address = 10.0.0.{{id}}/32
PrivateKey = PRIVATE_KEY
DNS = 9.9.9.9
[Peer]
PublicKey = GH+qA1Au9BraGhNt7Aqp8tdhGVfH8ENnY3VzKhe69XQ=
Endpoint = space.xecut.me:51900
AllowedIPs = 10.0.0.{{id}}/24
AllowedIPs = 10.0.0.1/24