Skip to content

[Script and Docker 🐳] OpenConnect (Cisco AnyConnect) VPN Server (OCServ) script one key easy configurator and installer

Notifications You must be signed in to change notification settings

mogilevich/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Installation

  1. Install Docker

1.1. Install certobt

sudo apt install certbot
sudo certbot certonly --standalone -d you.domain.net --email [email protected] --agree-tos --non-interactive
sudo systemctl list-timers | grep certbot
  1. Build docker image
git clone  https://github.com/mogilevich/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv.git
cd OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv/
docker build . -t ocserv
#docker build -t ocserv https://github.com/mogilevich/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv.git
  1. Run docker container
docker run -d \
   -v /etc/letsencrypt/live/you.domain.net/fullchain.pem:/etc/ocserv/certs/server-cert.pem:ro\
   -v /etc/letsencrypt/live/you.domain.net/privkey.pem:/etc/ocserv/certs/server-key.pem:ro\
   --name ocserv_container\
   --restart=always\
   --privileged -p 443:443 -p 443:443/udp ocserv
  1. Add user
docker exec -ti ocserv_container ocpasswd -c /etc/ocserv/ocpasswd testUserName
  1. Change user password
docker exec -ti ocserv_container ocpasswd -c /etc/ocserv/ocpasswd testUserName
  1. Delete user
docker exec -ti ocserv_container ocpasswd -c /etc/ocserv/ocpasswd -d testUserName
  1. Lock user
docker exec -ti ocserv_container ocpasswd -c /etc/ocserv/ocpasswd -l testUserName
  1. Unlock user
docker exec -ti ocserv_container ocpasswd -c /etc/ocserv/ocpasswd -u testUserName
  1. Show all users and their hashed password
docker exec -ti ocserv_container cat /etc/ocserv/ocpasswd
  1. Import list user
cd user_managment/
nano users.txt
./add_users.sh

Features

  • Easy install
  • Easy uninstall
  • Add User
  • Change Password
  • Show All Users
  • Delete User
  • Lock User
  • Unlock User

How to connect to it?

For making connection to your server, you can use AnyConnect, OpenConnect or other alternative clients.

And one more thing, contributions are welcome.

More

The script is based on here

About

[Script and Docker 🐳] OpenConnect (Cisco AnyConnect) VPN Server (OCServ) script one key easy configurator and installer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 87.3%
  • Dockerfile 12.7%