B-andi-T / Openconnect-installer-Full-Management-Menu

OpenConnect VPN installer with management menu for Ubuntu servers
GNU General Public License v3.0
37 stars 16 forks source link
anyconnect-installer anyconnect-script anyconnect-vpn-server auto-installer letsencrypt-certificates linux ocserv-auto-installer ocserv-installer ocserv-script ocserv-server openconnect-installer openconnect-vpn-server script ubuntu vpn

Secured OCSERV+LetsEncrypt+Menu (Ubuntu 18.04 , 20.04 , 22.04)

A script that allows you to install and configure OpenConnect and LetsEncrypt on your Ubuntu server in the simplest way.

Compatibility

Requirement

Why use this script?

First, let's see the initial steps of installation

You need to answer a few simple questions, Then you won't have to do anything except wait a few moments and script will do :

After finishing the installation and configuration, now you have access to a Menu by running the script again.

Features that you'll have access in the menu

You will also have an option to completely remove OCSERV(s) from the server.

How to use

Download and execute the script

wget https://raw.githubusercontent.com/B-andi-T/Openconnect-installer-Full-Management-Menu/main/Ocserv-Installer.sh
chmod +x Ocserv-Installer.sh
./Ocserv-Installer.sh

Now answer a few simple questions and wait for the installation and configuration to finish.

that's it!

Now, if you run the script again, you will be redirected to the menu. At the top of the menu, you can see server specifications, OCServ version and service status. The menu contains most of the options you will need to manage your OCServ.

Futex facility returned an unexpected error (ubuntu 22.04)

Please note, if you are using Ubuntu 22.04 and you are unable to connect the client to the server after completing the installation, check the server status and if you see The ""futex facility returned an unexpected error"", select the FIX OCServ Futex Error (Ubuntu 22.04) option from the OCServ menu and Wait for the operation to complete. Then connect the client again

Do you live in a country where ocserv is blocked?

Since ocserv is blocked in some countries (such as Iran), if you live in these countries and want to use ocserv, you can ssh tunnel to your main server through a local server.

for example :

You have a local server (a VPS inside your country) called server A and your destination server where ocserv is installed is called server B. First, make sure OCServ is active on server B without errors.

Run the following command on server A:

ssh -p {SERVER B SSH PORT} -f -N -L 0.0.0.0:{ANY PORT YOU WANT}:{SERVER B IP}:{SERVER B OCSERV PORT} root@{SERVER B IP}

example :

ssh -p 22 -f -N -L 0.0.0.0:2222:2.2.2.2:2222 root@2.2.2.2

-If the firewall is active on your server, you should open the port you are using.

Now connect the client to your local server (such as mobile, computer, etc.). as below:

yourlocalserverIP:PORT

of course you will see the ""untrusted server"" message popup when connecting, and the reason is that you are not connecting directly to the main server where your domain and certificate are located.

Clients

Donation

If you are happy with my script, you can make me happy too with a small amount of donation!

Cheers!

Good luck