OK to start off, first time here, and hello everyone!
I'm trying to add a router (Netgear R6250) specifically to use for Wireguard VPN (Surfshark). So, any device that connects to this router, will be going through the VPN.
My current home setup is ISP Router => 3 other APs. So the OpenWRT will be the 4th.
I have gotten the setup to work (though not sure if it is proper) this way:
OpenWRT as AP, with static IP and DHCP off.
Installing Wireguard with Surfshark VPN according to Surfshark's guide.
Setup the Firewall according to the Surfshark guide.
Setup Manual IP settings for each connecting device.
And at first, everything works great. Every device I've tried to connect goes through the VPN via the OpenWRT router. And if I connect to my other regular APs, internet does not go through the VPN.
This worked for several hours, and I thought I finally got it to work. HOWEVER, after going to sleep, the next day there's no Internet connection anymore through the OpenWRT router. Inspecting the Wireguard Interface, it seems the Surfshark VPN is not "Receiving" packets? If I delete the Wireguard interface and firewall rule, then I get Internet access again via the OpenWRT router (no VPN). Reinstalling/resetting/restarting the Wireguard interface doesn't solve this.
I'm not very Network savvy, and have been meddling with this setup for 4 days now: connecting via WAN port, staying with 192.168.1.1 settings, not turning DHCP off, screwing up all kinds of settings. And finally gotten to where I am now. I'm really getting frustrated now, and I think I'm at the end of my knowledge/capabilities here.
So could anyone be kind enough to help me with this issue? Thanks.
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
wg show
So the fundamental issue is that you've got a dumb AP configuration where the DHCP server from your main router tells clients to use the main router (192.168.1.1) as the gateway. This means that the clients aren't even aware of the fact that they could use this router as a gateway.
What you can do is quite simple -- connect this device to the upstream using the wan port of the R6250. To make this work, you also need to change the subnet of the lan on this device... maybe use the address 192.168.5.1 (remove the gateway from the lan interface), and re-enable the DHCP server.
You'll also want to make sure that the SSID is not the same as your other APs so that you must specifically choose to connect to this one for the VPN to be in use (if it is the same, client devices may roam on and off of this AP and it will cause inconsistent behaviors).
Once you change the address (and re-enable the DHCP server), you'll need to make sure the upstream device is not conneted to the lan port anymore (now that connection will be via th wan port). You'll also need to renew your computer's DHCP lease -- you can do this by bouncing the connection, restarting your computer, or using the "renew" button if your OS gives you an option to do that.
OK so from the looks of it, it seems to be working! Send/Receive packets are being populated now in the Wireguard Interface. Thank you so much for your help!
Uhh....sorry to open this up again. But there seems to be a slight issue "somewhere".
Internet's definitely working through the OpenWRT router, and Wireguard also seems to be working since its both Transmitting and Receiving packets. However, it doesn't seem the internet traffic is really going "through" the VPN, if that makes sense at all?
To make things a bit more clear, I'm currently in a country that has internet restrictions. So what's happening is, regular sites can be accessed. But if I try to open a restricted site, it won't open. In Firefox, I'm getting a "pr_end_of_file_error". And when I try those "what's my IP" sites, some say I'm in the current country, while some say I'm in the VPN country.