From 532d2f179ef8a697b1bfd87e625fa227993960d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Spagnolo?= Date: Wed, 5 Apr 2023 12:55:17 +0200 Subject: [PATCH] Update files and additional material added --- README.md | 4 ++++ vg/Vagrantfile | 4 ++-- vg/playbooks/server_init.yml | 13 +++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 33065f1..7cebff6 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,8 @@ zathura report/report.pdf ```bash wireshark pcap/eth1_traffic.pcap # public interface (encrypted traffic) wiershark pcap/wg0_traffic.pcap # wireguard interface (decrypted traffic) +wiershark pcap/keep_alive.pcap # public interface (encrypted traffic, keepalive packets) ``` + +## Good resource about wireguard +- [github](https://github.com/pirate/wireguard-docs) diff --git a/vg/Vagrantfile b/vg/Vagrantfile index 5626829..5ed3645 100644 --- a/vg/Vagrantfile +++ b/vg/Vagrantfile @@ -17,9 +17,9 @@ Vagrant.configure("2") do |config| kvm.memory_size = '2048m' end rootNode.vm.provider :libvirt do |libvirt, override| - libvirt.memory = 2048 + libvirt.memory = 1024 libvirt.nested = true - libvirt.cpus = 2 + libvirt.cpus = 1 end # Ansible provisioning diff --git a/vg/playbooks/server_init.yml b/vg/playbooks/server_init.yml index 6967a42..9ac1e41 100644 --- a/vg/playbooks/server_init.yml +++ b/vg/playbooks/server_init.yml @@ -148,3 +148,16 @@ - name: Add each peer to root node configuration ansible.builtin.shell: "wg set wg0 peer {{ peer_node_pubkeys[item] }} allowed-ips 10.6.0.{{ item+2 }}" loop: "{{ range(0, n_peer_nodes) | list }}" + + +# Enable IP forwarding on the peer through which other devices on the network will connect to WireGuard peer +# sysctl -w net.ipv4.ip_forward=1 +# sysctl -w net.ipv6.conf.all.forwarding=1 +# +# +# +# ENABLE LOGGING FOR DEBUGGING +# modprobe wireguard +# echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control +# dmesg -wH +