Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - aney1

#1
Ok, I'll check how to do it via the API.

Thanks for the reply.
#2
Hi,

I would like to write a script that adds peers to the wireguard config.
When a peer is added via the webui this file is populated: /usr/local/etc/wireguard/wg0.conf.
So I added a peer there, but not matter what I do, the peer is never shown in the webgui and gets removed after a reboot.

Do I have to add it via /conf/config.xml or is there a way to apply from wg0.conf?

This is what I tried:
- created a peer from the gui to get a config that should definitely work.
- copied it from the config file; deleted it again from the gui; added it back to the config file
- configctl wireguard configure /usr/local/etc/wireguard/wg0.conf
- /usr/local/sbin/configctl wireguard restart
- /usr/local/sbin/configctl webgui restart

configctl wireguard showconf does show a new peer after that, but not the webgui, and after a reboot the config is overwritten again.