VPN Switch Script Fix?

I’ve spent quite a while trying to get a VPN enable / disable working with the switch on the MT300N (BTN_0) but I’m struggling.

I’ve done this by modifying the AR150 scripts posted in this thread (removing customisations to dhcp & network, and updating it for BTN_0 for the MT300N).

The UI shows the vpn as connected but it won’t load any content (presumably due to setvpnfirewall). This instructions on this post state to replace setvpnfirewall removing – from --force etc but this worked intermittently and also stopped the VPN from being enabled / disabled from the UI which likely relies on --.

I was wondering if there was a way to force VPN, which appears to run delete_all_forwarding & set_vpn_config commands, from the up script without interfering with setvpnfirewall or if any one has any better way to get a VPN switch working?

I’ve attached the files and setvpnfirewall below (You can test by copying / extracting VPN to root, chmod +x /vpn/config.sh then cd /vpn/ and ./config.sh)

I still think it is the problem of setvpnfirewall. The correct syntax is as following. You didn’t add - - to disable.

Anyway, an updated firmware will be published soon and you can configure this in the UI directly.

setvpnfirewall --force
setvpnfirewall --disable