From b40264ecbe2554f7f877737a8d136680ccf07ac6 Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Fri, 8 Mar 2024 01:46:15 -0600 Subject: [PATCH] doc --- self_hosting/bypass_cgnat/README.md | 14 ++++++++------ self_hosting/bypass_cgnat/bypasscgnat.sh | 3 +++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/self_hosting/bypass_cgnat/README.md b/self_hosting/bypass_cgnat/README.md index 36edeeb..fabd122 100644 --- a/self_hosting/bypass_cgnat/README.md +++ b/self_hosting/bypass_cgnat/README.md @@ -2,11 +2,13 @@ Setup a wireguard VPN to route traffic from a VPS to your local machine. Based from [this](https://github.com/mochman/Bypass_CGNAT) guide. -# Possible extra configuration +### Usage -``` -auto eth0 -iface eth0 inet static - . . . - dns-nameservers 1.1.1.1 9.9.9.9 +This creates a file `client.conf` in the current directory, +and it will output the client configuration to the terminal as well. + +```shell +wget -qO /opt/bypasscgnat.sh "https://gitlab.com/tavo-wasd/guides/-/raw/main/self_hosting/bypass_cgnat/bypasscgnat.sh" +chmod +x /opt/bypasscgnat.sh +/opt/bypasscgnat.sh ``` diff --git a/self_hosting/bypass_cgnat/bypasscgnat.sh b/self_hosting/bypass_cgnat/bypasscgnat.sh index 68bda1b..9b635ce 100644 --- a/self_hosting/bypass_cgnat/bypasscgnat.sh +++ b/self_hosting/bypass_cgnat/bypasscgnat.sh @@ -47,6 +47,8 @@ install_wireguard() { } wireguard_config() { + ufw allow 55107 + printf "net.ipv6.conf.all.forwarding = 1\nnet.ipv4.ip_forward = 1" > /etc/sysctl.d/wg.conf sysctl -p sysctl --system @@ -62,6 +64,7 @@ wireguard_config() { install_wireguard wireguard_config +ufw reload echo "[Interface] PrivateKey = ${SERVER_PRV_KEY}