OPNsense Forum

English Forums => Virtual private networks => Topic started by: sierramike on January 02, 2026, 02:47:27 PM

Title: Peer generator - possible to set default values/templating ?
Post by: sierramike on January 02, 2026, 02:47:27 PM
Hi everyone,

I'm using OpnSense since some years now and I really like it. I've started using the Wireguard VPN for road warriors (laptops and smartphones), I like the Peer generator feature, but the "endpoint" parameter is empty and the DNS parameter is absent.

Is there a way to modify the template that is used in the generated setup text so that the endpoint would be initialized with my desired value "vpn.mydomain.tld:12345", and the DNS parameter in the [Interface] section would be set to 10.1.2.3 (IP of my DNS server) ?

So that I don't need to modify this manually each time I create a peer.

Thanks a lot
Title: Re: Peer generator - possible to set default values/templating ?
Post by: username_123 on May 01, 2026, 01:52:29 PM
Hi,

i think I had the same "problem". Somehow or sometime I set up a default configuration for my WireGuard instances.
Every time i wanted to create a new peer using the "Peer generator" I had to change the endpoint and port to the new requirements.

Unluckily I did not find a the configuration using the GUI. So I used the SSH and searched using mc.
I found the configuration in the file /conf/config.xml stored at the XML path /opnsense/OPNsense/wireguard/server/servers . After changing the required values I rebooted OPNsense. Not sure if a reboot is required, but I was the fastest way to ensure that the changes would survive a reboot.
Worked with OPNsense 26.1.6_2.

Hope this was your problem.

Robert