8 Commits

Author SHA1 Message Date
3ab9170c8f [wg] update requirements check 2026-03-10 23:42:51 +01:00
875304f58b [wg] reload systemd after config change 2026-03-10 23:14:46 +01:00
5bc955d5ef add wireguard key for netstat 2026-03-10 22:48:49 +01:00
49f91ac87f [wg] remove dns 2026-03-10 22:45:05 +01:00
3494008084 [wg] switch which wg ip incremented 2026-03-10 22:42:16 +01:00
7497629b6d [Wireguard] user root 2026-03-10 22:24:39 +01:00
a830ad508c add wireguard key for coja 2026-03-10 22:24:39 +01:00
4db6fa5078 fix nimbus ip address 2026-03-10 22:22:42 +01:00
5 changed files with 19 additions and 5 deletions

View File

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

View File

@@ -7,7 +7,7 @@ all:
wireguard: wireguard:
hosts: hosts:
192.168.0.93: 192.168.10.93:
arch: arch:
hosts: hosts:
10.0.0.1: 10.0.0.1:

View File

@@ -1,7 +1,7 @@
--- ---
- name: Install Wireguard on Server - name: Install Wireguard on Server
hosts: wireguard hosts: wireguard
become: true user: root
tasks: tasks:
- name: Install wireguard tools and dig - name: Install wireguard tools and dig
@@ -14,6 +14,7 @@
ansible.builtin.copy: ansible.builtin.copy:
src: wireguard/wg0.conf src: wireguard/wg0.conf
dest: /etc/wireguard/wg0.conf dest: /etc/wireguard/wg0.conf
notify: Reload systemd daemon
- name: Get server public IP - name: Get server public IP
ansible.builtin.command: dig +short myip.opendns.com @resolver1.opendns.com ansible.builtin.command: dig +short myip.opendns.com @resolver1.opendns.com
@@ -30,3 +31,8 @@
name: wg-quick@wg0 name: wg-quick@wg0
enabled: yes enabled: yes
handlers:
- name: Reload systemd daemon
ansible.builtin.command:
cmd: systemctl daemon-reload

View File

@@ -10,3 +10,10 @@ id: 2
name: Malin Freeborn name: Malin Freeborn
pubkey: loNnXRalD0ZyOLadSWm31rqOuRfEbgtX9O4/z7eSIho= 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. # Client configuration for wireguard to nimbus at xecut.
[Interface] [Interface]
Address = 10.0.0.2/32 Address = 10.0.0.{{id}}/32
PrivateKey = PRIVATE_KEY PrivateKey = PRIVATE_KEY
DNS = 9.9.9.9
[Peer] [Peer]
PublicKey = GH+qA1Au9BraGhNt7Aqp8tdhGVfH8ENnY3VzKhe69XQ= PublicKey = GH+qA1Au9BraGhNt7Aqp8tdhGVfH8ENnY3VzKhe69XQ=
Endpoint = space.xecut.me:51900 Endpoint = space.xecut.me:51900
AllowedIPs = 10.0.0.{{id}}/24 AllowedIPs = 10.0.0.1/24