Wireguard-kmod and Interface/Routing questions

Started by BoogaBooga, January 01, 2022, 04:15:33 PM

Previous topic - Next topic
Hi Everyone,
I've been trying to setup wireguard(-go/-kmod) and have a few questions about the way Opnsense deals with interfaces and routes.

If I install wireguard manually, do I need the gui plugin? This is going to be a site to site VPN so I am fine with configuring manually. Will wireguard work without the plugin?

Second, most tutorials online direct you to add a wireguard interface in the gui. When I install wireguard and bring up the interface (i.e. wg0) I see it exists by running ifconfig. What benefit does adding an 'interface' in the gui provide? Is it required?

Similar question for gateways and static routes. In opnsense land, whats the difference between a Gateway and a static route?

Can I add a static route using the route command without doing anything in the gui? route add -net etc..

Thanks!

I followed this guide today to successfully set up a site-to-site VPN using WG:
https://psychogun.github.io/docs/opnsense/WireGuard-Site-2-Site/

I did not have to use any console commands.

Thanks, I've seen a lot of guides. IMO, the plugin is not very intuitive to use, I prefer text configs and was wondering if I need to bother with the GUI at all to make it work.

You dont need the gui, just pkg install wireguard via CLI.
You only need to assign WG Interfaces when you connect to VPN providers. Otherwise no need to assign