• Stars
    star
    255
  • Rank 158,847 (Top 4 %)
  • Language
    Shell
  • Created almost 5 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

OpenConnect-VPN-Server

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.

2023 JAN UPDATE: We added a help instruction for Docker custom installation so everyone can fully customized ocserv configuration for him/her self like port number, custom header etc.

Docker Installation

  1. Install Docker
  2. Build docker image
docker build -t ocserv https://github.com/iw4p/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv.git
  1. Run docker container
docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d ocserv
  1. Add user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd testUserName
  1. Change user password
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd testUserName
  1. Delete user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -d testUserName
  1. Lock user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -l testUserName
  1. Unlock user
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -u testUserName
  1. Show all users and their hashed password
docker exec -ti ocserv cat /etc/ocserv/ocpasswd

Script Installation

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

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.

How to customize the configuration?

In docker way, at the beginning you have to clone the repo:

git clone https://github.com/iw4p/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv.git

cd to the directory

cd ./OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv

You can change port, disable UDP, add custom-header and so on. Modify and customize ocserv.conf file and then build your image with modified ocserv.conf:

docker build . -t ocserv

Create new container from ocserv image

docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d ocserv

Next steps like add or remove users are same as Docker Installation part.

Issues

Feel free to submit issues and enhancement requests or contact me via vida.page/nima.

Star History

Star History Chart

More

The script is based on here

More Repositories

1

proxy-scraper

scrape proxies from more than 5 different sources and check which ones are still alive
Python
494
star
2

telegram-cloud

Download and upload files via your Telegram account up to 2 GB
Python
203
star
3

torrentp

Python torrent downloader - Download from torrent with .torrent file or magnet link, with just 3 lines of python code.
Python
153
star
4

partialjson

Parsing ChatGPT JSON stream response — Partial and incomplete JSON parser python library for OpenAI
Python
57
star
5

Ton-Fragment

UnOfficial Fragment API (Telegram - Ton Coin) Python library
Python
32
star
6

Virtual-3D-Model-Conference-Room

Virtual 3D Model Conference Room
JavaScript
23
star
7

3D-Model-Viewer

An example of the <model-viewer> project from Google
HTML
11
star
8

WhatsApp-Tweak

Disable Read receipts WhatsApp.
Logos
4
star
9

Checklist

Checklist app - Swift
Swift
4
star
10

Twitter-Scraper

A Twitter Watcher (Tweet Scraper without API and limitations) - (Twitter Scraper)
Python
4
star
11

Fuck-SandBox

Get list of installed apps and their info on iOS
Swift
3
star
12

WhatsApp-2FA

retrieve 2FA code of your WhatsApp
Logos
3
star
13

iw4p.github.io

HTML
3
star
14

Arduino

Simple Arduino projects
C++
2
star
15

RadioJavanBot

Radio Javan Telegram Bot to fetch data and download links from URL
Python
2
star
16

python-OOP-unittest-design-pattern

basic OOP implementation - python calculator for learning test and design patterns
Python
2
star
17

RadioJavan-Password-retriever

Password retriever For Radio Javan Application - iOS
Logos
1
star
18

iw4p

I can get out of vim quickly
1
star
19

FandoghBot

simple https://fandogh.cloud telegram bot to fix my exec problem, maybe gonna bigger and add more features one day
Python
1
star
20

Verilog

Basic and simple Verilog programs with testbench
Verilog
1
star
21

RATGram

RAT (Remote Access Trojan) Via Telegram Bot
1
star
22

Bull-s-Eye

A simple game with simple codes [RW]
Swift
1
star
23

packet-sniffer

Python
1
star
24

Vebko-Chat-Service

chat service for Vebko company using React and TypeScript and .NET Framework 4
JavaScript
1
star
25

chip8-emulator

A chip8 emulator powered by Rust 🦀
Rust
1
star
26

Calculator

Very very simple calculator app for iOS devices. Created for learning purpose and fun.
Swift
1
star
27

iOS-AdsBlocker

DNS ads blocking
JavaScript
1
star
28

Infinity-loop

Move imageViews like a cloud on the sky (animation)
Swift
1
star
29

Reinforcement-Learning

Jupyter Notebook
1
star