OPNsense Forum

English Forums => Virtual private networks => Topic started by: BrownCow on December 13, 2020, 10:22:39 PM

Title: WireGuard Site to Site
Post by: BrownCow on December 13, 2020, 10:22:39 PM
First off, I understand that I might be doing this all wrong but I've tried to get myself as far as I can before asking for help.

I want to implement WireGuard in a site to site configuration and since I'm learning, I've decided to put it into OpnSense first. Later I might install it bare metal.

Both setups are ISP Modem -> Asus Router. I still want to use both Asus routers for everything they currently do. As such I only want OpnSense to run WireGuard and nothing more.

I followed this guide up until Step 3. https://docs.opnsense.org/manual/how-tos/wireguard-s2s.html

Both instances of WireGuard initiate and stay that way so it appears I have done something right. Neither have WAN interfaces but both can ping the internet through the existing LAN. I can't ping from one network to the other. I do have an existing OpenVPN server running on one site and can log into it from the other. (Should I stop the OpenVPN server?) Both networks are using the same DHCP range but their servers assign to different subsets.

Running WireGuard from terminal produces:

Title: Re: WireGuard Site to Site
Post by: Greelan on December 13, 2020, 10:47:16 PM
Try changing the AllowedIPs to CIDR notation, eg 192.168.5.1/32
Title: Re: WireGuard Site to Site
Post by: BrownCow on December 13, 2020, 11:05:10 PM
Thanks. I just tried that but I'm still not getting a handshake and still can't ping from one vm to the other.
Title: Re: WireGuard Site to Site
Post by: Greelan on December 13, 2020, 11:10:15 PM
Quite possibly a routing issue as you have guessed. I haven't implemented WG on a host behind my firewall, only on the OPNsense firewall itself, so haven't got any immediate ideas for your scenario
Title: Re: WireGuard Site to Site
Post by: BrownCow on December 13, 2020, 11:12:30 PM
Thanks. I'll keep plugging away and hopefully someone might have an idea.
Title: Re: WireGuard Site to Site
Post by: Greelan on December 14, 2020, 12:03:36 AM
Have you thought about port forwarding on your router? Incoming requests on the WG port need to be directed to the WG host
Title: Re: WireGuard Site to Site
Post by: BrownCow on December 14, 2020, 12:16:41 AM
On both routers I have forwarded port 51820 from all addresses to the relevant VM.

I also turned off the firewalls on both routers (temporarily) but that didn't help either.