diff --git a/README.md b/README.md index 7cebff6..c5a3043 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,33 @@ wiershark pcap/keep_alive.pcap # public interface (encrypted traffic, keepalive ## Good resource about wireguard - [github](https://github.com/pirate/wireguard-docs) + +## Enable IP forwarding on the peer through which other devices on the network will connect to WireGuard peer +```bash +sysctl -w net.ipv4.ip_forward=1 +sysctl -w net.ipv6.conf.all.forwarding=1 +``` + +## ENABLE logging for debugging +```bash +modprobe wireguard +echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control +dmesg -wH +``` + +## Run in docker +```yml +version: '3' + +services: + wireguard: + image: linuxserver/wireguard + ports: + - 51820:51820/udp + cap_add: + - NET_ADMIN + - SYS_MODULE + volumes: + - /lib/modules:/lib/modules + - ./wg0.conf:/config/wg0.conf:ro +``` diff --git a/vg/playbooks/server_init.yml b/vg/playbooks/server_init.yml index 9ac1e41..6967a42 100644 --- a/vg/playbooks/server_init.yml +++ b/vg/playbooks/server_init.yml @@ -148,16 +148,3 @@ - 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 -