PreUp/PostDown keys not supported in WireGuard Config


I am trying to use PreUp/PostDown directives as mentioned here. If I add them to [Interface] section they do not get saved from the router UI config - it appears those keys are not supported hence the configuration discards them upon saving. Is there any way I can add them at the start/close of WG VPN connection?


  • Architecture: ARMv7 Processor rev 4 (v7l)
  • Openwrt Version: OpenWrt 21.02-SNAPSHOT r16399+159-c67509efd7
  • Kernel Version: 4.4.60
  • Firmware Type: release1

wg-quick script is not installed on the router, you can run the commands manually.