this post was submitted on 21 Jan 2024
1 points (100.0% liked)

WireGuard

3 readers
1 users here now

WireGuard - a fast, modern, secure VPN Tunnel.

founded 1 year ago
MODERATORS
 
This is an automated archive.

The original was posted on /r/wireguard by /u/Teggers_Today on 2024-01-21 10:21:24+00:00.


Im following this guide but not using Mallvad

I can connect to the server with wireguard tools from the host - all traffic goes through - no problems.

I can connect to the server via the wireguard container - all docker traffic goes through - no problems.

I can connect my phone to the server - all traffic goes through - no problems.

I'm sure i have to do something like this on the ubuntu host:

sudo ip route del default

sudo ip route add 192.53.172.117 via 192.168.0.1

sudo ip route add default via 172.20.0.50

Then set host sysctl.conf to:

net.ipv4.ip_forward=1

I understand that this has to be repeated after each host reboot (unless i set up a service) - all cool

My .conf:

[Interface]

Address = 10.252.1.1/32

PrivateKey = xxxxxxxxxxxxx

DNS = 1.1.1.1

PostUp = iptables -t nat -A POSTROUTING -o wg+ -j MASQUERADE

PreDown = iptables -t nat -D POSTROUTING -o wg+ -j MASQUERADE

MTU = 1450

[Peer]

PublicKey = xxxxxxxxxxxxxxxxxxxx

PresharedKey = xxxxxxxxxxxxxxxxxx

AllowedIPs = 0.0.0.0/0

Endpoint = 192.53.172.117:51820

PersistentKeepalive = 15

Ive even tried disabling UFW and fixing the host /etc/resolv.conf with sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf.

Someone please tell me the secret sauce - i cant believe that connecting the ubuntu host to a wireguard container is this hard?!

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here