Skip to content

dockerised/docker-anyconnect-vpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use run Cisco AnyConnect client inside docker

Dockerhub link

This Dockerfile is a replica of jetbrainsinfra/docker-anyconnect-vpn plus SSH client.

#!/bin/sh
export ANYCONNECT_SERVER=
export ANYCONNECT_USER=
export ANYCONNECT_PASSWORD=

docker rm -f vpn ; 
docker run --name vpn -d -v ~/.zsh_history:/root/.zsh_history -v ~/.zshrc:/root/.zshrc:ro -v ~/.ssh:/root/.ssh:ro -e ANYCONNECT_SERVER=${ANYCONNECT_SERVER} -e ANYCONNECT_USER=${ANYCONNECT_USER} -e ANYCONNECT_PASSWORD=${ANYCONNECT_PASSWORD} --privileged george7522/anyconnect
docker exec -it vpn zsh

#Run commands to your VPN'ed network
  • Successful output from prompt shown below

## Example bash function for quick usage

# Usage:
# ~$ vpn 
# root /$ ssh root@myvpnprotectedserver

function vpn(){
        export ANYCONNECT_SERVER=myaccess.vpn.com;
        export ANYCONNECT_USER=myusername;
        export ANYCONNECT_PASSWORD='replaceme';
        docker rm -f vpn ; docker run --name vpn -d -v ~/.zsh_history:/root/.zsh_history -v ~/.zshrc:/root/.zshrc:ro -v ~/.ssh:/root/.ssh:ro -e ANYCONNECT_SERVER=${ANYCONNECT_SERVER} -e ANYCONNECT_USER=${ANYCONNECT_USER} -e ANYCONNECT_PASSWORD=${ANYCONNECT_PASSWORD} --privileged george7522/anyconnect
        sleep 3
        docker exec -it vpn zsh
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published