OPNsense Forum

English Forums => Virtual private networks => Topic started by: Chiefmas on May 13, 2021, 07:16:46 PM

Title: Wireguard setup questions
Post by: Chiefmas on May 13, 2021, 07:16:46 PM
I've set WG up before, running directly on an Ubuntu server, but I'm a little unclear about how a few things work when doing it on OpnSense.

I'm running OpnSense on an older 4 port Protectli appliance. I'm using it just as a network appliance to run useful network services for me, for instance, as a separate gateway for VPN connectivity. And trying to move my WG peer off of my Ubuntu server onto it.

So, things I'm not clear on:

The guides I've been following to get it running on OpnSense haven't quite fit, since OpnSense isn't running as my edge router/firewall, and I've been trying to fit what's going on into what I had to do to get it setup on Ubuntu, but it doesn't seem to be falling into place for me, so any help is appreciated!

Thanks!
Title: Re: Wireguard setup questions
Post by: Chiefmas on May 13, 2021, 09:57:25 PM
Well, I went through my setup from zero (uninstall WG, re-install, reconfigure everything) and it worked this time. I'm not sure what I did differently, if anything.

It does seem just leaving IP stuff empty on the named interface that's bound to the network device is fine, and I guess the device, wg0, just uses default routes? I might try and figure out how to get it to bind to a different nic later, but I'm not worried about it right this moment.

I did forget I needed a firewall outbound allow rule on the Wireguard ruleset to get traffic to go beyond local; I hadn't gotten as far as even successful handshakes in the past, so I hadn't worried about outbound connections until now. Once I dropped that rule in, the last part started working as I wanted.
Title: Re: Wireguard setup questions
Post by: Greelan on May 13, 2021, 10:04:44 PM
Glad you got it working.

This thread (https://forum.opnsense.org/index.php?topic=22778.0) will help explain what the default "Wireguard" is (tldr; it is an interface group, not an interface).

You can't/don't "bind" the wgX interface to a NIC.