I have a strange set up between my friend's and mine networks. I used to use opnSense on both sides and had wireguard VPN working for a couple of years. I've decided to replace my opnSense box with Raspberry Pi4 and I can't get the wireguard VPN to work. Well, I got to work partially: I can actually see that the wireguard esteblishes the connection and I can actually ping the remote router from OpenWRT by selecting the wireguard interface "ping -I WG1 192.168.1.1", but not traffic is flowing between the networks otherwise. What should I add into static routes?
That's fair, I changed the route, but unfortunately that didn't help. Still can't ping 192.168.1.1 or any host in 192.168.1.0/24 from 10.10.0.0/24 network
Please 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:
So it is actually much simpler that I thought. It is not necessary to define any static routes and I copied allowed_ips in wireguard configuration from what I had set up in opnSense previously, I guess those aren't necessary either.
I'm unsure about the delegate option, what does that do?
As a side note I'm very surprised at the performance of wireguard on Rpi4. I'm basically maxing out remote upload rate (150Mbit/s) at 30% load.
I’m honestly not sure what the delegate option does and I can find the documentation at the moment. But I have seen many cases where that needs to be removed (in fact, I have never seen a case where it was necessary to be there).
Wireguard’s allowed ips field really is quite useful and easy. If you have the route allowed ips option enabled, additional routes are rarely needed. It’s really pretty cool.
And yes, wg is quite efficient. If you did the same test with OpenVPN, you’d likely peg your processor well before hitting your full internet speed.