Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Using pluginctl with wireguard tunnels?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Using pluginctl with wireguard tunnels? (Read 3794 times)
Flamez
Newbie
Posts: 17
Karma: 0
Using pluginctl with wireguard tunnels?
«
on:
August 24, 2023, 06:08:26 pm »
I am wanting to stop and start a couple different wireguard tunnels at a preset time each day. I used to be able to do this with OpenVPN using "pluginctl -s openvpn start <tunnel name>" inside a cron job.
So far, I have only been able to use pluginctl -s wireguard start to start and pluginctl -s wireguard stop. This start/stops all wireguard tunnels at the same time. I tried using the tunnel name and it didn't work.
Any ideas?
Thank you.
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: Using pluginctl with wireguard tunnels?
«
Reply #1 on:
August 24, 2023, 06:41:55 pm »
os-wireguard-devel on 23.7.2 already has that extension, but we are still testing as it is more or less a fundamental change.
See
https://github.com/opnsense/plugins/commit/86c9e5ccc87ca
Cheers,
Franco
Logged
Flamez
Newbie
Posts: 17
Karma: 0
Re: Using pluginctl with wireguard tunnels?
«
Reply #2 on:
August 24, 2023, 06:51:21 pm »
Thank you for the fast response. Looking forward to the update.
-Flamez
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: Using pluginctl with wireguard tunnels?
«
Reply #3 on:
August 24, 2023, 07:01:46 pm »
Feel free to try it as well if you already updated to 23.7.2:
# pkg install os-wireguard-devel
and to get back
# pkg install os-wireguard(-go)
depending on the kmod/go variant used.
It probably needs a restart to be started properly.
Cheers,
Franco
Logged
Flamez
Newbie
Posts: 17
Karma: 0
Re: Using pluginctl with wireguard tunnels?
«
Reply #4 on:
August 25, 2023, 01:38:24 am »
I first removed the wireguard plugin and then installed the os-wireguard-devel. I did a reboot of the firewall, and everything came online normal. Reviewing the firmware plugins page, I noticed it showed the plugin os-wireguard-devel (misconfigured). It did not show this before. Both vpn tunnels seem to be working just fine.
What would be the correct command to start or stop an individual vpn tunnel?
Thank you,
-Flamez
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: Using pluginctl with wireguard tunnels?
«
Reply #5 on:
August 25, 2023, 01:03:00 pm »
You can list all instances:
# pluginctl -S wireguard
Use <id> like with OpenVPN:
# pluginctl -s wireguard restart <id>
Cheers,
Franco
Logged
Flamez
Newbie
Posts: 17
Karma: 0
Re: Using pluginctl with wireguard tunnels?
«
Reply #6 on:
August 25, 2023, 06:12:47 pm »
That worked! Reviewing the firmware plugins page, I noticed it showed the plugin os-wireguard-devel (misconfigured). Is the normal since it's a development version? I did notice under vpn/wireguard there is a log file tab now. It shows 3 errors, and everything seems to be working ok.
Thank you so much for your help with this. I will continue to test and let you know if i run into any issues.
-Flamez
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: Using pluginctl with wireguard tunnels?
«
Reply #7 on:
August 25, 2023, 07:00:34 pm »
Thanks a lot for testing. Ad did a very nice job on this one it seems.
The "misconfigured" is because it was installed from the console, because development versions cannot be installed from the GUI. But under System: Firmware: Status you can select "Resolve plugin conflicts" and activate "Reset all local conflicts" which marks os-wireguard-devel as properly installed.
Cheers,
Franco
Logged
Flamez
Newbie
Posts: 17
Karma: 0
Re: Using pluginctl with wireguard tunnels?
«
Reply #8 on:
September 14, 2023, 07:14:20 am »
I am finally getting back to work on setting up cron jobs to start and stop wireguard instances at a specific time each day and I was wondering if there is a way to add these commands to the drop-down menu in the cron section so I could pick to them from the menu and just add the cron times in the web GUI?
Thank again for all your help.
-Flamez
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Using pluginctl with wireguard tunnels?