case "disconnect":
    // Delete direct route for the VPN gateway
    echo("Deleting Direct Route for VPN Gateway");
    exec("route delete " + env("VPNGATEWAY") + " mask");
    exec("netsh interface ip set dns " + env("TUNIDX") + " source=static")
    exec("netsh interface ip delete dns " + env("TUNIDX") + "") Use above code for use with Openconnect 1.5.3

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.