Changes

Jump to navigation Jump to search
3,481 bytes added ,  2 years ago
Line 368: Line 368:  
     wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
 
     wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
   −
*Example install using the defaults:
+
*Example install using the defaults (installed on Ubuntu 20.04.2 LTS VM):
    
   Welcome to this OpenVPN road warrior installer!
 
   Welcome to this OpenVPN road warrior installer!
Line 481: Line 481:  
   New clients can be added by running this script again.
 
   New clients can be added by running this script again.
   −
*You can run it again to add/remove users or completely uninstall OpenVPN
+
==== Add a user ====
 +
To add a new user, run the openvpn-install.sh script again and select option '''1 - Add a new client'''
 +
  # bash openvpn-install.sh
 +
 
 +
  OpenVPN is already installed.
 +
 
 +
  Select an option:
 +
      1) Add a new client
 +
      2) Revoke an existing client
 +
      3) Remove OpenVPN
 +
      4) Exit
 +
  Option: 1
 +
*You will be prompted for a name, in this example we use client2
 +
  Provide a name for the client:
 +
  Name: client2
 +
  Using SSL: openssl OpenSSL 1.1.1f  31 Mar 2020
 +
  Generating a RSA private key
 +
  ....................................................+++++
 +
  ....+++++
 +
  writing new private key to '/etc/openvpn/server/easy-rsa/pki/easy-rsa-4310.cmbMtC/tmp.MMKA2C'
 +
  -----
 +
  Using configuration from /etc/openvpn/server/easy-rsa/pki/easy-rsa-4310.cmbMtC/tmp.l84eev
 +
  Check that the request matches the signature
 +
  Signature ok
 +
  The Subject's Distinguished Name is as follows
 +
  commonName            :ASN.1 12:'client2'
 +
  Certificate is to be certified until Jul 10 05:41:10 2031 GMT (3650 days)
 +
 
 +
  Write out database with 1 new entries
 +
  Data Base Updated
 +
 
 +
 
 +
  client2 added. Configuration available in: /root/client2.ovpn
 +
 
 +
*Copy the configuration file above to your client to use it with OpenVPN
 +
 
 +
==== Remove a user ====
 +
To add a remove a user, run the openvpn-install.sh script again and select option '''2 - Revoke an existing client'''
 +
 
 +
  # bash openvpn-install.sh
 +
 
 +
  OpenVPN is already installed.
 +
 
 +
  Select an option:
 +
      1) Add a new client
 +
      2) Revoke an existing client
 +
      3) Remove OpenVPN
 +
      4) Exit
 +
  Option: 2
 +
*You will be presented with a list of configured users to remove.  We will choose client2 for this example.
 +
  Select the client to revoke:
 +
        1) client
 +
        2) client2
 +
  Client: 2
 +
 
 +
  Confirm client2 revocation? [y/N]: Y
 +
  Using SSL: openssl OpenSSL 1.1.1f  31 Mar 2020
 +
  Using configuration from /etc/openvpn/server/easy-rsa/pki/easy-rsa-4407.i66z91/tmp.iS3gWM
 +
  Revoking Certificate 05D02E0DF2A242398233588721BB75E0.
 +
  Data Base Updated
 +
 
 +
  Using SSL: openssl OpenSSL 1.1.1f  31 Mar 2020
 +
  Using configuration from /etc/openvpn/server/easy-rsa/pki/easy-rsa-4444.LpkzMp/tmp.03Azaw
 +
 
 +
  An updated CRL has been created.
 +
  CRL file: /etc/openvpn/server/easy-rsa/pki/crl.pem
 +
 
 +
 
 +
 
 +
  client2 revoked!
 +
 
 +
==== Uninstall ====
 +
*To uninstall, run the openvpn-install.sh script again and select option '''3 - Remove OpenVPN'''
 +
  Confirm OpenVPN removal? [y/N]:
 +
*When prompted answer Y to start the removal
 +
 
 +
  Removed /etc/systemd/system/multi-user.target.wants/openvpn-iptables.service.
 +
  Removed /etc/systemd/system/multi-user.target.wants/openvpn-server@server.service.
 +
  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 packages will be REMOVED:
 +
    openvpn*
 +
  0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
 +
  After this operation, 1,188 kB disk space will be freed.
 +
  (Reading database ... 109344 files and directories currently installed.)
 +
  Removing openvpn (2.4.7-1ubuntu2.20.04.2) ...
 +
  Processing triggers for man-db (2.9.1-1) ...
 +
  (Reading database ... 109265 files and directories currently installed.)
 +
  Purging configuration files for openvpn (2.4.7-1ubuntu2.20.04.2) ...
 +
  Processing triggers for systemd (245.4-4ubuntu3.7) ...
 +
 
 +
  OpenVPN removed!
    
== TINC ==
 
== TINC ==

Navigation menu