I am running OMV 6 on a Raspberry Pi 4B with the Wireguard plugin. I used the default settings, which the documentation indicates should do IP forwarding. When I connect my phone to the tunnel using the official Wireguard app I can successfully access pages being served on my home LAN. However, if I go to https://www.whatismyip.com/ while connected to the tunnel I get the IP address of the phone's 4G connection, not the IP address of my home network.
My tunnel config is as shown:
[Interface]
Address = 10.192.1.254/24
SaveConfig = true
ListenPort = 51820
PrivateKey = [redacted]
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = [redacted]
AllowedIPs = 10.192.1.1/32
PresharedKey = [redacted]
Alles anzeigen
And my client config is:
[Interface]
Address = 10.192.1.1/24
PrivateKey = [redacted]
DNS = 192.168.1.1
[Peer]
PublicKey = [redacted]
PresharedKey = [redacted]
Endpoint = [redacted]:51820
AllowedIPs = 0.0.0.0/0
I have verified that systemctl net.ipv4.ip_forward returns "1". I installed PiVPN on the same device at port 51821 and using the same app on my phone to connect to the non-OMV Wireguard server on that port does successfully give my the IP of my home network.