Sign inSign up

atotto/docker-anyconnect-vpn

By atotto

•Updated over 5 years ago

Image
0

202

atotto/docker-anyconnect-vpn repository overview

⁠How to use

⁠ssh

Terminal1:

export ANYCONNECT_SERVER=https://example.com
export ANYCONNECT_USER=abc
export ANYCONNECT_PASSWORD=1234567
export ANYCONNECT_FINGERPRINT=sha256:cafebabe
export MY_SERVER_ADDR=192.168.1.2
$ docker-compose up --abort-on-container-exit

Terminal2:

$ docker-compose exec ssh ssh [email protected]

⁠ssh with port-forwarding

Terminal2:

example of forwarding 22(ssh) port.

$ docker-compose exec ssh ssh [email protected] -L 0.0.0.0:22:localhost:22

Terminal3:

You can check the IP address of the vpn container.

$ docker network inspect docker-anyconnect-vpn_default | jq .[0].Containers                                                        [~/src/.../atotto/docker-anyconnect-vpn:master]
{
  "xxxx": {
    "Name": "vpn",
    "EndpointID": "xxxx",
    "MacAddress": "02:11:00:15:00:02",
    "IPv4Address": "172.21.0.2/16",
    "IPv6Address": ""
  }
}

You can access remotely via ssh tunneling.

example:

$ ssh 172.21.0.2

and

$ scp xxx 172.21.0.2:

etc.

Tag summary

Content type

Image

Digest

Size

8.1 MB

Last updated

over 5 years ago

docker pull atotto/docker-anyconnect-vpn:vpn