Selasa, 19 November 2019

How to install open vpn access server on centos 7

  Tidak ada komentar
Install open vpn as repository
[root@localhost ~]# yum -y install https://as-repository.openvpn.net/as-repo-cen                                                      tos7.rpm
Loaded plugins: fastestmirror
as-repo-centos7.rpm                                      | 8.9 kB     00:00
Examining /var/tmp/yum-root-DAkXnc/as-repo-centos7.rpm: openvpn-as-yum-7-1.noarc                                                      h
Marking /var/tmp/yum-root-DAkXnc/as-repo-centos7.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openvpn-as-yum.noarch 0:7-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch          Version      Repository               Size
================================================================================
Installing:
 openvpn-as-yum        noarch        7-1          /as-repo-centos7        3.3 k

Transaction Summary
================================================================================
Install  1 Package

Total size: 3.3 k
Installed size: 3.3 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : openvpn-as-yum-7-1.noarch                                    1/1
  Verifying  : openvpn-as-yum-7-1.noarch                                    1/1

Installed:
  openvpn-as-yum.noarch 0:7-1

Complete!
[root@localhost ~]#
Install open vpn as with yum command
[root@localhost ~]# yum -y install openvpn-as
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.dionipe.net
 * extras: mirror.dionipe.net
 * updates: mirror.dionipe.net
as-repo-centos7                                          | 2.9 kB     00:00
base                                                     | 3.6 kB     00:00
cheese                                                                                                         | 3.4 kB  00:00:00
cr                                                                                                             | 2.9 kB  00:00:00
extras                                                                                                         | 2.9 kB  00:00:00
updates                                                                                                        | 2.9 kB  00:00:00
as-repo-centos7/primary_db                                                                                     | 2.3 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package openvpn-as.x86_64 0:2.7.5_932a08a3-CentOSrelease will be installed
--> Processing Dependency: openvpn-as-bundled-clients for package: openvpn-as-2.7.5_932a08a3-CentOSrelease.x86_64
--> Running transaction check
---> Package openvpn-as-bundled-clients.noarch 0:2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================
 Package                                Arch               Version                                  Repository                   Size
======================================================================================================================================
Installing:
 openvpn-as                             x86_64             2.7.5_932a08a3-CentOSrelease             as-repo-centos7              38 M
Installing for dependencies:
 openvpn-as-bundled-clients             noarch             2-1                                      as-repo-centos7             119 M

Transaction Summary
======================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 157 M
Installed size: 220 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/as-repo-centos7/packages/openvpn-as-2.7.5-CentOS7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 3aaaaa96: NOKEY
Public key for openvpn-as-2.7.5-CentOS7.x86_64.rpm is not installed
(1/2): openvpn-as-2.7.5-CentOS7.x86_64.rpm                                                                     |  38 MB  00:00:18
(2/2): openvpn-as-bundled-clients-2.rpm                                                                        | 119 MB  00:00:51
--------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                 3.1 MB/s | 157 MB  00:00:51
Retrieving key from file:///etc/pki/rpm-gpg/OPENVPN-AS-GPG-KEY
Importing GPG key 0x3AAAAA96:
 Userid     : "Access Server (Access Server Package Key) <[email protected]>"
 Fingerprint: 8b1b c7fe cb72 59e1 430a 3aa0 26eb 3912 3aaa aa96
 Package    : openvpn-as-yum-7-1.noarch (@/as-repo-centos7)
 From       : /etc/pki/rpm-gpg/OPENVPN-AS-GPG-KEY
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : openvpn-as-bundled-clients-2-1.noarch                                                                              1/2
  Installing : openvpn-as-2.7.5_932a08a3-CentOSrelease.x86_64                                                                     2/2

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

Please enter "passwd openvpn" to set the initial
administrative password, then login as "openvpn" to continue
configuration here: https://192.168.72.26:943/admin

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

+++++++++++++++++++++++++++++++++++++++++++++++
Access Server Web UIs are available here:
Admin  UI: https://192.168.72.26:943/admin
Client UI: https://192.168.72.26:943/
+++++++++++++++++++++++++++++++++++++++++++++++

Beginning with OpenVPN AS 2.6.0 compression is disabled by default and on upgrades as security patch.
  Verifying  : openvpn-as-2.7.5_932a08a3-CentOSrelease.x86_64                                                                     1/2
  Verifying  : openvpn-as-bundled-clients-2-1.noarch                                                                              2/2

Installed:
  openvpn-as.x86_64 0:2.7.5_932a08a3-CentOSrelease

Dependency Installed:
  openvpn-as-bundled-clients.noarch 0:2-1

Complete!
[root@localhost ~]#
Check open vpn as service
[root@localhost ~]# service openvpnas status
Redirecting to /bin/systemctl status openvpnas.service
● openvpnas.service - OpenVPN Access Server Service
   Loaded: loaded (/etc/systemd/system/openvpnas.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-11-12 12:02:08 WIB; 4min 6s ago
  Process: 10035 ExecStart=/usr/local/openvpn_as/scripts/openvpnas --logfile=/var/log/openvpnas.log --pidfile=/var/run/openvpnas.pid (code=exited, status=0/SUCCESS)
 Main PID: 10040 (python)
   CGroup: /system.slice/openvpnas.service
           ├─10040 python -c from pyovpn.sagent.sagent_entry import openvpnas ; openvpnas() --logfile=/var/log/openvpnas.log --pidf...
           ├─10065 python -c from pyovpn.log.logworker import start ; start()
           ├─10066 python -c from pyovpn.cserv.wserv_entry import start ; start() -no -u openvpn_as -g openvpn_as --pidfile /usr/lo...
           ├─10089 python -c from pyovpn.sagent.iptworker import start6 ; start6()
           ├─10092 python -c from pyovpn.sagent.iptworker import start ; start()
           ├─10097 openvpn-openssl --errors-to-stderr --config stdin
           ├─10103 openvpn-openssl --errors-to-stderr --config stdin
           ├─10125 openvpn-openssl --errors-to-stderr --config stdin
           ├─10128 openvpn-openssl --errors-to-stderr --config stdin
           ├─10146 openvpn-openssl --errors-to-stderr --config stdin
           ├─10149 openvpn-openssl --errors-to-stderr --config stdin
           ├─10167 openvpn-openssl --errors-to-stderr --config stdin
           ├─10170 openvpn-openssl --errors-to-stderr --config stdin
           ├─10188 openvpn-openssl --errors-to-stderr --config stdin
           ├─10191 openvpn-openssl --errors-to-stderr --config stdin
           ├─10209 openvpn-openssl --errors-to-stderr --config stdin
           ├─10212 openvpn-openssl --errors-to-stderr --config stdin
           ├─10230 openvpn-openssl --errors-to-stderr --config stdin
           ├─10233 openvpn-openssl --errors-to-stderr --config stdin
           ├─10251 openvpn-openssl --errors-to-stderr --config stdin
           ├─10254 openvpn-openssl --errors-to-stderr --config stdin
           ├─10272 openvpn-openssl --errors-to-stderr --config stdin
           ├─10280 iptables-restore -n
           ├─10293 openvpn-openssl --errors-to-stderr --config stdin
           ├─10313 openvpn-openssl --errors-to-stderr --config stdin
           ├─10333 openvpn-openssl --errors-to-stderr --config stdin
           ├─10353 openvpn-openssl --errors-to-stderr --config stdin
           ├─10373 openvpn-openssl --errors-to-stderr --config stdin
           ├─10393 openvpn-openssl --errors-to-stderr --config stdin
           └─10413 openvpn-openssl --errors-to-stderr --config stdin

Nov 12 12:02:07 localhost.localdomain systemd[1]: Starting OpenVPN Access Server Service...
Nov 12 12:02:08 localhost.localdomain systemd[1]: Started OpenVPN Access Server Service.
[root@localhost ~]#
Set open vpn as password
[root@localhost ~]# passwd openvpn
Changing password for user openvpn.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]#
Check open vpn as service

Tidak ada komentar :

Posting Komentar