From 7d096fbf4cc0541601c986ee7a7c882e49454cab Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 11 Jul 2019 15:05:22 +0200 Subject: [PATCH 1/2] fix copy paste errors --- content/post/wireguard-vps-android.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/post/wireguard-vps-android.md b/content/post/wireguard-vps-android.md index 41e02a6..8ccbb84 100644 --- a/content/post/wireguard-vps-android.md +++ b/content/post/wireguard-vps-android.md @@ -31,7 +31,7 @@ We will use the range 100.64.0.0/10 (RFC 6598) because it doesn't colide with pr To get the public key (you need it later on): - wg pubkey <<<$(grep PrivateKey /etc/wireguard/wg_obermui.conf | cut -d ' ' -f3) + wg pubkey <<<$(grep PrivateKey /etc/wireguard/wg0.conf | cut -d ' ' -f3) Now the gateway is configured and running. To get some information, type in wg and use systemd: @@ -56,7 +56,7 @@ Now add the client information to the gateway and restart the interface. PublicKey = >> /etc/wireguard/wg0.conf AllowedIPs = 100.64.0.2/32 >> /etc/wireguard/wg0.conf - systemctl restart wg-quick@wg0 && ystemctl status wg-quick@wg0 + systemctl restart wg-quick@wg0 && systemctl status wg-quick@wg0 # Sources From c317fae59a3bcb54eeb3de0dc7939df7e39cf943 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 11 Jul 2019 15:11:29 +0200 Subject: [PATCH 2/2] remember to save iptables rule --- content/post/wireguard-vps-android.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/post/wireguard-vps-android.md b/content/post/wireguard-vps-android.md index 8ccbb84..b46e131 100644 --- a/content/post/wireguard-vps-android.md +++ b/content/post/wireguard-vps-android.md @@ -29,6 +29,8 @@ We will use the range 100.64.0.0/10 (RFC 6598) because it doesn't colide with pr iptables -t nat -A POSTROUTING -s 100.64.0.0/10 -o eth0 -j MASQUERADE systemctl enable --now wg-quick@wg0 +Don't forget to save the iptables rules for the next start. The easiest way is to use cron, but I don't recommend it. + To get the public key (you need it later on): wg pubkey <<<$(grep PrivateKey /etc/wireguard/wg0.conf | cut -d ' ' -f3)