Wireguard Postup with openwrt config/network

Is it possible to use the PostUp config that exists for wireguard configs inside the uci config file for wireguard interfaces to run a script on startup of said interface?

Have a look at using a hotplug script:
https://openwrt.org/docs/guide-user/base-system/hotplug

For an example see: https://github.com/egc112/OpenWRT-egc-add-on/tree/main/pbr-via-vpn

Thanks that worked perfectly even was able to configure the firewall to ensure it only allows clients to connect to the vpn after the script has already run. Inside the same hotplug script.

1 Like

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