Need help with WireGuard configuration

Started by Vexz, December 24, 2024, 08:29:35 AM

Previous topic - Next topic
First some facts about my network(s) and my goal(s):
  • LAN net: 10.0.0.0/24, dynamic /56 Prefix from my ISP
  • Dual Stack setup
  • WireGuard net: 10.0.1.0/24
  • I want full LAN net access over WireGuard to my LAN net with IPv4 and IPv6
  • All traffic from WireGuard clients should go over WireGuard connection
  • To access the internet with active WG configuration, there's a specific gateway on my OPNsense the WG clients must use
  • OPNsense version 24.7.11_2

WireGuard instance on my OPNsense:


Example of a peer configuration on my OPNsense:


Example of a WireGuard configuration of one of my clients:



WAN firewall rule to allow inbound WireGuard connections from WAN:


WireGuard firewall rules:



I tried this configuration, but all I could achieve so far is getting a connection between my OPNsense and the WG client, so that the WG client could access the internet from my OPNsense over the default gateway (but that's not what I want) and that only with IPv4. The LAN net isn't accessible at all.

Looks like I'm too blind to see why it isn't working. Would appreciate some help from more experienced people to tell me what I did wrong.

Thanks in advance.

Remove IPv6-Support completely until IPv4 works flawlessly like you want.   
And maybe don't use the WireGuard Tab at all and assign an interface for your WG-Server. But that is only an uneducated guess, could be unnecessary but it can't hurt.   

Quote from: Bob.Dig on December 24, 2024, 07:58:51 PMRemove IPv6-Support completely until IPv4 works flawlessly like you want.   
How would this help? It's not like IPv4 and IPv6 are blocking each other in any way.

Quote from: Bob.Dig on December 24, 2024, 07:58:51 PMAnd maybe don't use the WireGuard Tab at all and assign an interface for your WG-Server. But that is only an uneducated guess, could be unnecessary but it can't hurt.   
The firewall rules in the screenshot are assigned to the virtual WireGuard interface, that I had to assign in the interfaces settings first.