OpenVPN Access Server

Install

apt update && apt -y install ca-certificates wget net-tools gnupg wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add - echo “deb http://as-repository.openvpn.net/as/debian focal main”>/etc/apt/sources.list.d/openvpn-as-repo.list apt update && apt -y install openvpn-as

root@captain-VirtualBox:~# wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
OK
root@captain-VirtualBox:~# echo "deb http://as-repository.openvpn.net/as/debian focal main">/etc/apt/sources.list.d/openvpn-as-repo.list
root@captain-VirtualBox:~# apt update && apt -y install openvpn-as
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease  
Hit:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease 
Get:4 http://as-repository.openvpn.net/as/debian focal InRelease [7,548 B]
Hit:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:6 http://as-repository.openvpn.net/as/debian focal/main amd64 Packages [11.6 kB]
Fetched 19.2 kB in 1s (27.8 kB/s)     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://as-repository.openvpn.net/as/debian focal InRelease' doesn't support architecture 'i386'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libpkcs11-helper1
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  bridge-utils ieee-data libmariadb3 mariadb-common openvpn-as-bundled-clients python3-arrow python3-attr python3-automat python3-bs4
  python3-constantly python3-decorator python3-distutils python3-hamcrest python3-html5lib python3-hyperlink python3-incremental
  python3-ldap3 python3-lib2to3 python3-lxml python3-migrate python3-mysqldb python3-netaddr python3-openssl python3-pbr python3-pyasn1
  python3-pyasn1-modules python3-service-identity python3-setuptools python3-soupsieve python3-sqlalchemy python3-sqlalchemy-ext
  python3-sqlparse python3-tempita python3-twisted python3-twisted-bin python3-webencodings python3-zope.interface sqlite3
Suggested packages:
  ifupdown python-arrow-doc python-attr-doc python3-genshi python3-lxml-dbg python-lxml-doc python-migrate-doc default-mysql-server
  | virtual-mysql-server python3-mysqldb-dbg ipython3 python-netaddr-docs python-openssl-doc python3-openssl-dbg python-setuptools-doc
  python-sqlalchemy-doc python3-psycopg2 python3-fdb python-sqlparse-doc python3-tk python3-pampy python3-qt4 python3-serial
  python3-wxgtk2.8 python3-twisted-bin-dbg sqlite3-doc
The following NEW packages will be installed:
  bridge-utils ieee-data libmariadb3 mariadb-common openvpn-as openvpn-as-bundled-clients python3-arrow python3-attr python3-automat
  python3-bs4 python3-constantly python3-decorator python3-distutils python3-hamcrest python3-html5lib python3-hyperlink
  python3-incremental python3-ldap3 python3-lib2to3 python3-lxml python3-migrate python3-mysqldb python3-netaddr python3-openssl
  python3-pbr python3-pyasn1 python3-pyasn1-modules python3-service-identity python3-setuptools python3-soupsieve python3-sqlalchemy
  python3-sqlalchemy-ext python3-sqlparse python3-tempita python3-twisted python3-twisted-bin python3-webencodings
  python3-zope.interface sqlite3
0 upgraded, 39 newly installed, 0 to remove and 0 not upgraded.
Need to get 193 MB of archives.
After this operation, 255 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal/main amd64 bridge-utils amd64 1.6-2ubuntu1 [30.5 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/main amd64 ieee-data all 20180805.1 [1,589 kB]
Get:3 http://as-repository.openvpn.net/as/debian focal/main amd64 openvpn-as-bundled-clients all 25 [171 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 mariadb-common all 1:10.3.34-0ubuntu0.20.04.1 [15.9 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libmariadb3 amd64 1:10.3.34-0ubuntu0.20.04.1 [155 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 sqlite3 amd64 3.31.1-4ubuntu0.4 [860 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-decorator all 4.4.2-0ubuntu1 [10.3 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-lib2to3 all 3.8.10-0ubuntu1~20.04 [76.3 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-distutils all 3.8.10-0ubuntu1~20.04 [141 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-setuptools all 45.2.0-1 [330 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-pbr all 5.4.5-0ubuntu1 [64.0 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-sqlalchemy all 1.3.12+ds1-1ubuntu2 [763 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-sqlparse all 0.2.4-3 [28.1 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-tempita all 0.5.2-6 [14.8 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-migrate all 0.13.0-0ubuntu1 [69.8 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-mysqldb amd64 1.4.4-2build1 [44.9 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-incremental all 16.10.1-3.2 [14.9 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-netaddr all 0.7.19-3ubuntu1 [236 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-arrow all 0.15.5-1 [36.8 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-lxml amd64 4.5.0-1ubuntu0.5 [1,384 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-pyasn1 all 0.4.2-3build1 [46.7 kB]                                  
Get:22 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-ldap3 all 2.4.1-2 [217 kB]                                      
Get:23 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-attr all 19.3.0-2 [33.9 kB]                                         
Get:24 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-automat all 0.8.0-1ubuntu1 [27.5 kB]                                
Get:25 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-soupsieve all 1.9.5+dfsg-1 [29.1 kB]                                
Get:26 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-bs4 all 4.8.2-1 [83.0 kB]                                           
Get:27 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-constantly all 15.1.0-1build1 [8,244 B]                             
Get:28 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-hamcrest all 1.9.0-3 [24.9 kB]                                      
Get:29 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-webencodings all 0.5.1-1ubuntu1 [11.0 kB]                           
Get:30 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-html5lib all 1.0.1-2 [84.3 kB]                                      
Get:31 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-hyperlink all 19.0.0-1 [33.5 kB]                                    
Get:32 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-openssl all 19.0.0-1build1 [43.3 kB]                                
Get:33 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-pyasn1-modules all 0.2.1-0.2build1 [32.9 kB]                        
Get:34 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-service-identity all 18.1.0-5build1 [10.7 kB]                       
Get:35 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-sqlalchemy-ext amd64 1.3.12+ds1-1ubuntu2 [13.6 kB]                  
Get:36 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-zope.interface amd64 4.7.1-1 [85.2 kB]                              
Get:37 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-twisted-bin amd64 18.9.0-11ubuntu0.20.04.2 [11.4 kB]        
Get:38 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-twisted all 18.9.0-11ubuntu0.20.04.2 [1,933 kB]             
Get:39 http://as-repository.openvpn.net/as/debian focal/main amd64 openvpn-as amd64 2.11.0-794ab41d-Ubuntu20 [12.7 MB]                  
Fetched 193 MB in 11s (17.7 MB/s)                                                                                                       
Extracting templates from packages: 100%
Selecting previously unselected package bridge-utils.
(Reading database ... 158391 files and directories currently installed.)
Preparing to unpack .../00-bridge-utils_1.6-2ubuntu1_amd64.deb ...
Unpacking bridge-utils (1.6-2ubuntu1) ...
Selecting previously unselected package ieee-data.
Preparing to unpack .../01-ieee-data_20180805.1_all.deb ...
Unpacking ieee-data (20180805.1) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../02-mariadb-common_1%3a10.3.34-0ubuntu0.20.04.1_all.deb ...
Unpacking mariadb-common (1:10.3.34-0ubuntu0.20.04.1) ...
Selecting previously unselected package libmariadb3:amd64.
Preparing to unpack .../03-libmariadb3_1%3a10.3.34-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libmariadb3:amd64 (1:10.3.34-0ubuntu0.20.04.1) ...
Selecting previously unselected package sqlite3.
Preparing to unpack .../04-sqlite3_3.31.1-4ubuntu0.4_amd64.deb ...
Unpacking sqlite3 (3.31.1-4ubuntu0.4) ...
Selecting previously unselected package python3-decorator.
Preparing to unpack .../05-python3-decorator_4.4.2-0ubuntu1_all.deb ...
Unpacking python3-decorator (4.4.2-0ubuntu1) ...
Selecting previously unselected package python3-lib2to3.
Preparing to unpack .../06-python3-lib2to3_3.8.10-0ubuntu1~20.04_all.deb ...
Unpacking python3-lib2to3 (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package python3-distutils.
Preparing to unpack .../07-python3-distutils_3.8.10-0ubuntu1~20.04_all.deb ...
Unpacking python3-distutils (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../08-python3-setuptools_45.2.0-1_all.deb ...
Unpacking python3-setuptools (45.2.0-1) ...
Selecting previously unselected package python3-pbr.
Preparing to unpack .../09-python3-pbr_5.4.5-0ubuntu1_all.deb ...
Unpacking python3-pbr (5.4.5-0ubuntu1) ...
Selecting previously unselected package python3-sqlalchemy.
Preparing to unpack .../10-python3-sqlalchemy_1.3.12+ds1-1ubuntu2_all.deb ...
Unpacking python3-sqlalchemy (1.3.12+ds1-1ubuntu2) ...
Selecting previously unselected package python3-sqlparse.
Preparing to unpack .../11-python3-sqlparse_0.2.4-3_all.deb ...
Unpacking python3-sqlparse (0.2.4-3) ...
Selecting previously unselected package python3-tempita.
Preparing to unpack .../12-python3-tempita_0.5.2-6_all.deb ...
Unpacking python3-tempita (0.5.2-6) ...
Selecting previously unselected package python3-migrate.
Preparing to unpack .../13-python3-migrate_0.13.0-0ubuntu1_all.deb ...
Unpacking python3-migrate (0.13.0-0ubuntu1) ...
Selecting previously unselected package python3-mysqldb.
Preparing to unpack .../14-python3-mysqldb_1.4.4-2build1_amd64.deb ...
Unpacking python3-mysqldb (1.4.4-2build1) ...
Selecting previously unselected package python3-incremental.
Preparing to unpack .../15-python3-incremental_16.10.1-3.2_all.deb ...
Unpacking python3-incremental (16.10.1-3.2) ...
Selecting previously unselected package python3-netaddr.
Preparing to unpack .../16-python3-netaddr_0.7.19-3ubuntu1_all.deb ...
Unpacking python3-netaddr (0.7.19-3ubuntu1) ...
Selecting previously unselected package openvpn-as-bundled-clients.
Preparing to unpack .../17-openvpn-as-bundled-clients_25_all.deb ...
Unpacking openvpn-as-bundled-clients (25) ...
Selecting previously unselected package python3-arrow.
Preparing to unpack .../18-python3-arrow_0.15.5-1_all.deb ...
Unpacking python3-arrow (0.15.5-1) ...
Selecting previously unselected package python3-lxml:amd64.
Preparing to unpack .../19-python3-lxml_4.5.0-1ubuntu0.5_amd64.deb ...
Unpacking python3-lxml:amd64 (4.5.0-1ubuntu0.5) ...
Selecting previously unselected package python3-pyasn1.
Preparing to unpack .../20-python3-pyasn1_0.4.2-3build1_all.deb ...
Unpacking python3-pyasn1 (0.4.2-3build1) ...
Selecting previously unselected package python3-ldap3.
Preparing to unpack .../21-python3-ldap3_2.4.1-2_all.deb ...
Unpacking python3-ldap3 (2.4.1-2) ...
Selecting previously unselected package openvpn-as.
Preparing to unpack .../22-openvpn-as_2.11.0-794ab41d-Ubuntu20_amd64.deb ...
Unpacking openvpn-as (2.11.0-794ab41d-Ubuntu20) ...
Selecting previously unselected package python3-attr.
Preparing to unpack .../23-python3-attr_19.3.0-2_all.deb ...
Unpacking python3-attr (19.3.0-2) ...
Selecting previously unselected package python3-automat.
Preparing to unpack .../24-python3-automat_0.8.0-1ubuntu1_all.deb ...
Unpacking python3-automat (0.8.0-1ubuntu1) ...
Selecting previously unselected package python3-soupsieve.
Preparing to unpack .../25-python3-soupsieve_1.9.5+dfsg-1_all.deb ...
Unpacking python3-soupsieve (1.9.5+dfsg-1) ...
Selecting previously unselected package python3-bs4.
Preparing to unpack .../26-python3-bs4_4.8.2-1_all.deb ...
Unpacking python3-bs4 (4.8.2-1) ...
Selecting previously unselected package python3-constantly.
Preparing to unpack .../27-python3-constantly_15.1.0-1build1_all.deb ...
Unpacking python3-constantly (15.1.0-1build1) ...
Selecting previously unselected package python3-hamcrest.
Preparing to unpack .../28-python3-hamcrest_1.9.0-3_all.deb ...
Unpacking python3-hamcrest (1.9.0-3) ...
Selecting previously unselected package python3-webencodings.
Preparing to unpack .../29-python3-webencodings_0.5.1-1ubuntu1_all.deb ...
Unpacking python3-webencodings (0.5.1-1ubuntu1) ...
Selecting previously unselected package python3-html5lib.
Preparing to unpack .../30-python3-html5lib_1.0.1-2_all.deb ...
Unpacking python3-html5lib (1.0.1-2) ...
Selecting previously unselected package python3-hyperlink.
Preparing to unpack .../31-python3-hyperlink_19.0.0-1_all.deb ...
Unpacking python3-hyperlink (19.0.0-1) ...
Selecting previously unselected package python3-openssl.
Preparing to unpack .../32-python3-openssl_19.0.0-1build1_all.deb ...
Unpacking python3-openssl (19.0.0-1build1) ...
Selecting previously unselected package python3-pyasn1-modules.
Preparing to unpack .../33-python3-pyasn1-modules_0.2.1-0.2build1_all.deb ...
Unpacking python3-pyasn1-modules (0.2.1-0.2build1) ...
Selecting previously unselected package python3-service-identity.
Preparing to unpack .../34-python3-service-identity_18.1.0-5build1_all.deb ...
Unpacking python3-service-identity (18.1.0-5build1) ...
Selecting previously unselected package python3-sqlalchemy-ext.
Preparing to unpack .../35-python3-sqlalchemy-ext_1.3.12+ds1-1ubuntu2_amd64.deb ...
Unpacking python3-sqlalchemy-ext (1.3.12+ds1-1ubuntu2) ...
Selecting previously unselected package python3-zope.interface.
Preparing to unpack .../36-python3-zope.interface_4.7.1-1_amd64.deb ...
Unpacking python3-zope.interface (4.7.1-1) ...
Selecting previously unselected package python3-twisted-bin:amd64.
Preparing to unpack .../37-python3-twisted-bin_18.9.0-11ubuntu0.20.04.2_amd64.deb ...
Unpacking python3-twisted-bin:amd64 (18.9.0-11ubuntu0.20.04.2) ...
Selecting previously unselected package python3-twisted.
Preparing to unpack .../38-python3-twisted_18.9.0-11ubuntu0.20.04.2_all.deb ...
Unpacking python3-twisted (18.9.0-11ubuntu0.20.04.2) ...
Setting up python3-attr (19.3.0-2) ...
Setting up python3-arrow (0.15.5-1) ...
Setting up python3-zope.interface (4.7.1-1) ...
Setting up python3-openssl (19.0.0-1build1) ...
Setting up python3-automat (0.8.0-1ubuntu1) ...
Setting up python3-twisted-bin:amd64 (18.9.0-11ubuntu0.20.04.2) ...
Setting up python3-hamcrest (1.9.0-3) ...
Setting up python3-webencodings (0.5.1-1ubuntu1) ...
Setting up python3-sqlalchemy (1.3.12+ds1-1ubuntu2) ...
Setting up mariadb-common (1:10.3.34-0ubuntu0.20.04.1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up python3-mysqldb (1.4.4-2build1) ...
Setting up python3-sqlalchemy-ext (1.3.12+ds1-1ubuntu2) ...
Setting up python3-decorator (4.4.2-0ubuntu1) ...
Setting up python3-tempita (0.5.2-6) ...
Setting up python3-sqlparse (0.2.4-3) ...
Setting up openvpn-as-bundled-clients (25) ...
Setting up python3-incremental (16.10.1-3.2) ...
Setting up python3-hyperlink (19.0.0-1) ...
Setting up libmariadb3:amd64 (1:10.3.34-0ubuntu0.20.04.1) ...
Setting up python3-html5lib (1.0.1-2) ...
Setting up bridge-utils (1.6-2ubuntu1) ...
Setting up ieee-data (20180805.1) ...
Setting up python3-lxml:amd64 (4.5.0-1ubuntu0.5) ...
Setting up python3-pyasn1 (0.4.2-3build1) ...
Setting up python3-constantly (15.1.0-1build1) ...
Setting up python3-lib2to3 (3.8.10-0ubuntu1~20.04) ...
Setting up python3-soupsieve (1.9.5+dfsg-1) ...
Setting up sqlite3 (3.31.1-4ubuntu0.4) ...
Setting up python3-distutils (3.8.10-0ubuntu1~20.04) ...
Setting up python3-setuptools (45.2.0-1) ...
Setting up python3-pbr (5.4.5-0ubuntu1) ...
update-alternatives: using /usr/bin/python3-pbr to provide /usr/bin/pbr (pbr) in auto mode
Setting up python3-ldap3 (2.4.1-2) ...
Setting up python3-bs4 (4.8.2-1) ...
Setting up python3-pyasn1-modules (0.2.1-0.2build1) ...
Setting up python3-service-identity (18.1.0-5build1) ...
Setting up python3-netaddr (0.7.19-3ubuntu1) ...
Setting up python3-migrate (0.13.0-0ubuntu1) ...
Setting up openvpn-as (2.11.0-794ab41d-Ubuntu20) ...
Beginning with OpenVPN AS 2.6.0 compression is disabled by default and on upgrades as security patch.

To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool.

+++++++++++++++++++++++++++++++++++++++++++++++
Access Server 2.11.0 has been successfully installed in /usr/local/openvpn_as
Configuration log file has been written to /usr/local/openvpn_as/init.log


Access Server Web UIs are available here:
Admin  UI: https://10.0.2.15:943/admin
Client UI: https://10.0.2.15:943/
To login please use the "openvpn" account with "cAj4rWfPZPeC" password.
(password can be changed on Admin UI)
+++++++++++++++++++++++++++++++++++++++++++++++

Setting up python3-twisted (18.9.0-11ubuntu0.20.04.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
root@captain-VirtualBox:~# 

Journal