Wireguard and non-VPN external connections
I'm using a raspberry pi with raspbian. It's permanently connected to a wireguard VPN (the VPN doesn't support port forwarding from the external VPN address). I also want to host something on the raspberry pi and make it accessible over my home internet.
When the VPN is not connected:
The service works from inside my network.
The service works from outside my network. So the issue is not port forwarding from my modem to the pi
When the VPN is connected:
The service works from inside my network.
The service does not work from outside my network.
1 Reply
The config for
nftables
output of ip rule
:
I've tried marking traffic with a fwmarker if it's incoming on port {80,443} and sending it to a different route table, and adding some log lines in nftables. That logs some stuff out in journalctl
but the furthest I've come is having the SYNs come in to the server when accessing the service from outside the network, but it doesn't appear to be sending ACKs back
as far as I can tell, nothing in nftables should be blocking traffic coming into or going out of other services. The preraw
chain rule starting with iifname != "mullvad-se10"
shouldn't match traffic coming in on the network, and removing that rule doesn't solve the issue. Flushing the entire nftables table doesn't solve it either.
my routing table is pretty basic too:
x.1 is my router, x.76 is the pi itself
My current theory is that the packages are arriving on the server, hitting Apache properly, but then getting sent into oblivion down the tunnel on the reply. I have no idea how to fix that though, or if that's even the case.