Showing entries 1 to 2
Displaying posts with tag: shell script (reset)
Connecting your Linux to a Cisco AnyConnect (SSL) – part 3

Hi there !

 

This is the final part of using openconnect  - You can check the older ones below:

http://www.heitorlessa.com/connecting-your-linux-to-a-cisco-anyconnect-ssl-part-1/

http://www.heitorlessa.com/connecting-your-linux-to-a-cisco-anyconnect-ssl-part-2/

 

As mentioned previously, we will be covering here:

  • How to create a script to monitor such VPN using ICMP, and restart that VPN if it is down

 

I would say, this is very straight forward and does not require much knowledge, so we are going to follow the same procedure as part 2 – Show the script in parts and then a …

[Read more]
Connecting your Linux to a Cisco AnyConnect (SSL) – Part 2

Hey you!

As said in the part 1 of this article, I will be covering here:

  • How to create a openconnect init script

So, concerning the init script I will be posting parts of the script first, and then will put a link for download at the end.

First of all, we need the shebang (#!/bin/bash) and then global variables that will be used along the script:

# Path variables
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# VPN Variables
IFACE="sslvpn"
VPN_USER="vpn_user"
VPN_HOST="sslvpn.yourdomain.com"
VPN_PASS="vpn_password"
PID="/var/run/openconnect.pid"
TEMP_LOG="/tmp/status.txt"
INFO="Usage: $(basename "$0") (start|stop|status|restart)"

You can also define most of these options in a …

[Read more]
Showing entries 1 to 2