From 5d4269d172792aec9b2de775d8ea409ed4d678ee Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Fri, 27 May 2022 20:15:40 +0200 Subject: [PATCH] Add wireguard configuration --- etc/wireguard/wg0.conf | 11 +++++++++++ etc_clearnet_proxy/wireguard/wg0.conf | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 etc/wireguard/wg0.conf create mode 100644 etc_clearnet_proxy/wireguard/wg0.conf diff --git a/etc/wireguard/wg0.conf b/etc/wireguard/wg0.conf new file mode 100644 index 0000000..e98c714 --- /dev/null +++ b/etc/wireguard/wg0.conf @@ -0,0 +1,11 @@ +[Interface] +PrivateKey = YOUR_PRIVATE_KEY +Address = 10.9.0.2/24 +ListenPort = 12912 +MTU = 1380 + +[Peer] +PublicKey = YOUR_PUBLIC_KEY +AllowedIPs = 10.9.0.1/32 +Endpoint = YOUR_IP:12912 +PersistentKeepalive = 25 diff --git a/etc_clearnet_proxy/wireguard/wg0.conf b/etc_clearnet_proxy/wireguard/wg0.conf new file mode 100644 index 0000000..967f9ad --- /dev/null +++ b/etc_clearnet_proxy/wireguard/wg0.conf @@ -0,0 +1,13 @@ +[Interface] +Address = 10.9.0.1/24 +MTU = 1380 +SaveConfig = true +PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE +PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE +ListenPort = 12912 +PrivateKey = YOUR_PRIVATE_KEY + +[Peer] +PublicKey = YOUR_PUBLIC_KEY +AllowedIPs = 10.9.0.2/32 +Endpoint = YOUR_IP:12912