'wg syncconf' and interface addresses

David Steinn Geirsson david at isnic.is
Tue Mar 17 17:13:34 CET 2020


Hi,

In the wg(8) man page, under the section CONFIGURATION FILE FORMAT, is a list of allowed keys in the config. For the Interface section, it lists the valid keys as PrivateKey, ListenPort and FwMark. However, wireguard configuration files commonly have an Address key in there as well, and it is used by wg-quick to configure the wg interface IP address.

The problem is that such a configuration will fail when used with the wg tool. For instance, it is not possible to use 'wg syncconf' with it, as it will complain about an invalid configuration.

Is Address a valid key for WireGuard configuration, and if so should the wg tool not parse and apply those changes as well?

We are hitting this issue as we have a WireGuard server on FreeBSD. I'm trying to extend the FreeBSD package rc script to support graceful reload, and ended up having to remove the Address key from the configuration and configuring the IP address as part of the rc.d script. But I would prefer if 'wg syncconf' could handle that as well.

Best regards,
Davíð


More information about the WireGuard mailing list