I am ok with using linux, most of my networking is done through PFsense. and have been hitting my head against this wall for most of the day
At home I have a dynamic IP and would like a static IP for a few projects so I have set up a Wireguard server in Linode with a static IP. For outgoing connections from my network to websites this works wonderfully.
My issue is with incoming connections I have a few services which I would like to leave with a static IP and I cannot for the life of me find a solution to do the below
Wireguard server > PFsense > webserver
I have tested from PFsense to the web server and that works but I can’t seem to get the traffic from Wireguard to PFsense.
Does anyone have any experience with this kind of config?
… so, it’s kind of hard to tell without more info… people commonly forget what gets routed are packets not connections… and connections require packets going in both directions.
if you curl -v --connect-to www.mywebsite.com:443:220.127.116.11:443 https://www.mywebsite.com
where 18.104.22.168 is your public linode ip
You can then run tcpdump on Linode and/or on pfSense to check your port forwarding and firewall rules - and see where the packets are getting lost.
If your reply packets aren’t going over wireguard towards linode, then it’s likely that you’re not marking connections in pfSense propertly on ingress, and so reply packets are just getting NAT-ed to your isp provided IP address and are getting dropped before reaching linode.
(anyway, that’s my guess, … please test what happens with the initial SYN / SYN,ACK packets, and make sure they’re traveling along expected links)
For this to work, you’ll need to do some stuff manually.
First make sure to be able to access your webserver from within your Linode by allowing access to the server on the wireguard VPN and the firewall part of psense.
Then you need to add a masquerade / port forward option for anything that comes in on port 80 and 443. That you can do with iptables and the preup part of the wireguard config on the server. Hope this gives you a small outline of what to do!