2022 OCT UPDATE: We dockerized and added Dockerfile to run it anywhere you want on any linux distro easily. Buggy script for configuring OpenConnect (ocserv) protocol on the server easily and automatically.
Tested on ubuntu 18.04 and 16.04.
Download and saving script on your server:
curl -O https://raw.githubusercontent.com/iw4p/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv/master/ocserv-install.sh
Making script executable
chmod +x ocserv-install.sh
And then just run it:
./ocserv-install.sh
or
sudo bash ocserv-install.sh
- Install Docker
- Build docker image
docker build -t ocserv https://github.com/iw4p/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv.git
- Run docker container
docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d ocserv
- Add user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd testUserName
- Change user password
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd testUserName
- Delete user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -d testUserName
- Lock user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -l testUserName
- Unlock user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -u testUserName
- Show all users and their hashed password
docker exec -ti ocserv cat /etc/ocserv/ocpasswd
- Easy install
- Easy uninstall
- Add User
- Change Password
- Show All Users
- Delete User
- Lock User
- Unlock User
For making connection to your server, you can use AnyConnect
, OpenConnect
or other alternative clients.
- AnyConnect: GUI AnyConnect client for available platforms.
- OpenConnect: OpenConnect client for Linux.
And one more thing, contributions are welcome.
Feel free to submit issues and enhancement requests or contact me via vida.page/nima.
The script is based on here