Wiregurad: does not reload wireguard_<iface> section on change

If I change the wireguard interface section with LuCI

 config interface 'wg0'
         option proto 'wireguard'
         option force_link '0'
         option private_key '<KEY>'
         list addresses '192.168.9.1/24'
         option listen_port '51824'

the wireguard gets reconfigured on change.
But if I change the related section for the devices who use this interface

config wireguard_wg0
        option public_key '<KEY>'
        list allowed_ips '192.168.9.2'

nothing happens.
Do I miss something?

Please provide more details:

  • What peer config change did you make?
  • How did you reload/apply/save the configuration?

I changed for example the option public_key <key> in the section wireguard_wg0 and after that I did a save and apply. But nothing happens. The configuration gets not applied.

If I change the option listen_port <port> in the section interface wg0 and doing a save and apply. Then the configuration gets reloaded.

If I do a /etc/init.d/network restart then everything gets applied.

If you manually change the config files, you apply the changes with service blahblah restart (reload might work too).
If you change via uci, you need to commit and then restart service.
If you change in Luci you can use the Save/Apply button.

2 Likes

I can't reproduce this with current master, all peer changes gets applied after Save => Save & Apply in the relevant network config (tested with Powered by LuCI Master (git-19.297.34299-5c26916) / OpenWrt SNAPSHOT r11329-b9d58f7e06).

Anyway, after a peer change you need a manual restart of the wg interface, so that wg uses the changed config.

@feckert, what version of OpenWrt are you running?

This is know behavior for version 18.

I am running the latest master from yesterday.
Still the same problem.

If I change the setting in network config of a peer and after that I press Save&Apply nothing happens
The changes will not get applied till I do a /etc/init.d/network restart

Additional if I delete the wireguard network config the peers are not removed as well.
So If I add a new wireguard network config section the old peers are present again, because they were not delete before.

Thanks for your help and feedback.
The problem was that on applying the changes of the configuration the DNS-entries must be resolved and that was not the case.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.