Last active
November 20, 2017 13:11
-
-
Save facundovictor/9bc927c457acec6b1ca371d441ed3ae1 to your computer and use it in GitHub Desktop.
openconnect scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# References: | |
# https://github.com/dnschneid/crouton/wiki/Using-Cisco-AnyConnect-VPN-with-openconnect | |
# http://tuxdiary.com/2014/09/04/cisco-anyconnect-vpn-with-openvpn-openconnect/ | |
INTERFACE=tun1 | |
# Clear the tun interface | |
ifconfig $INTERFACE down | |
# Clear vpn | |
openvpn --rmtun --dev $INTERFACE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# References: | |
# https://github.com/dnschneid/crouton/wiki/Using-Cisco-AnyConnect-VPN-with-openconnect | |
# http://tuxdiary.com/2014/09/04/cisco-anyconnect-vpn-with-openvpn-openconnect/ | |
VPNGRP=<vpngrp> | |
VPNUSER=<user> | |
VPNURL=<vpn-router-url> | |
INTERFACE=tun1 | |
# Create the tun interface, set it up, and use it for connection the the VPN | |
openvpn --mktun --dev $INTERFACE && \ | |
ifconfig $INTERFACE up && \ | |
openconnect -s /etc/vpnc/vpnc-script $VPNURL --user=$VPNUSER --authgroup=$VPNGRP --interface=$INTERFACE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment