{"id":336,"date":"2017-08-02T23:10:59","date_gmt":"2017-08-02T15:10:59","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=336"},"modified":"2017-08-02T23:10:59","modified_gmt":"2017-08-02T15:10:59","slug":"how-to-install-openvpn-access-server","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=336","title":{"rendered":"How to Install OpenVPN Access Server"},"content":{"rendered":"<p>Virtual private network or VPN for short is a convenient way of setting up a secure connection to another networked host. OpenVPN Access Server is an open source software that implements VPN techniques through custom security protocols. VPN connections can be essential for development environments, allow secure browsing over public WiFi, or provide an anchor point for devices for which a static IP address\u00a0might not be possible.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1861 aligncenter\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/openvpn_access_server.png\" sizes=\"auto, (max-width: 327px) 100vw, 327px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/openvpn_access_server.png 327w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/openvpn_access_server-300x39.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/openvpn_access_server-60x8.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/openvpn_access_server-150x20.png 150w\" alt=\"openvpn_access_server\" width=\"327\" height=\"43\" \/><\/p>\n<p>OpenVPN clients can be installed on Windows, Mac and Linux as well as Android and iOS while the OpenVPN Access Server (AS) is available for most Linux distributions. This introductory guide to OpenVPN goes through the steps for setting up and configuring your personal Access Server, and how to connect to it.<\/p>\n<h2>Installing OpenVPN\u00a0Access Server<\/h2>\n<p>OpenVPN AS supports multiple configurations such as secure remote access to an internal network and private cloud network resources with fine-grained access control. The OpenVPN AS setup consists of three main components:<\/p>\n<ul>\n<li>Access Server is the underlying component that does all of the background work like routing, tunneling and encryption.<\/li>\n<li>Admin Web Interface makes the server management simple through an easy to use\u00a0control panel.<\/li>\n<li>Connect client, which can be downloaded directly from the Access Server, allows login through the AS web portal.<\/li>\n<\/ul>\n<p>The server software is available for a variety of Linux distributions and version. You can check out the OpenVPN Access Server\u00a0<a href=\"https:\/\/openvpn.net\/index.php\/access-server\/download-openvpn-as-sw.html\" target=\"_blank\" rel=\"noopener\">Software Packages -page<\/a>\u00a0or click the links below to find the correct software for your system.<\/p>\n<p><a href=\"https:\/\/openvpn.net\/index.php\/access-server\/download-openvpn-as-sw\/113.html?osfamily=RedHat\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1864\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/redhat.png\" sizes=\"auto, (max-width: 95px) 100vw, 95px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/redhat.png 116w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/redhat-46x60.png 46w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/redhat-114x150.png 114w\" alt=\"redhat\" width=\"95\" height=\"125\" \/><\/a><a href=\"https:\/\/openvpn.net\/index.php\/access-server\/download-openvpn-as-sw\/113.html?osfamily=Fedora\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1865\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/fedora.png\" sizes=\"auto, (max-width: 102px) 100vw, 102px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/fedora.png 124w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/fedora-49x60.png 49w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/fedora-122x150.png 122w\" alt=\"fedora\" width=\"102\" height=\"125\" \/><\/a><a href=\"https:\/\/openvpn.net\/index.php\/access-server\/download-openvpn-as-sw\/113.html?osfamily=CentOS\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1866\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/centos.png\" sizes=\"auto, (max-width: 103px) 100vw, 103px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/centos.png 125w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/centos-49x60.png 49w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/centos-123x150.png 123w\" alt=\"centos\" width=\"103\" height=\"125\" \/><\/a><a href=\"https:\/\/openvpn.net\/index.php\/access-server\/download-openvpn-as-sw\/113.html?osfamily=Ubuntu\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1867\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ubuntu.png\" sizes=\"auto, (max-width: 103px) 100vw, 103px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ubuntu.png 125w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ubuntu-49x60.png 49w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ubuntu-123x150.png 123w\" alt=\"ubuntu\" width=\"103\" height=\"125\" \/><\/a><a href=\"https:\/\/openvpn.net\/index.php\/access-server\/download-openvpn-as-sw\/113.html?osfamily=Debian\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1868\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/debian.png\" sizes=\"auto, (max-width: 103px) 100vw, 103px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/debian.png 125w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/debian-49x60.png 49w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/debian-123x150.png 123w\" alt=\"debian\" width=\"103\" height=\"125\" \/><\/a><a href=\"https:\/\/openvpn.net\/index.php\/access-server\/download-openvpn-as-sw\/113.html?osfamily=openSUSE\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1869\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/opensuse.png\" sizes=\"auto, (max-width: 96px) 100vw, 96px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/opensuse.png 117w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/opensuse-46x60.png 46w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/opensuse-115x150.png 115w\" alt=\"opensuse\" width=\"96\" height=\"125\" \/><\/a><\/p>\n<p>Getting the Access Server installed is simple, download the appropriate package for your system and then use a package manager to install it. The installation process will set up\u00a0a default configuration, which allows a quick and easy way to get a server running. Below are listed the terminal commands for Debian 8, Ubuntu 14 and CentOS 7\u00a0systems to download and install the OpenVPN AS.<\/p>\n<h5>Debian 8<\/h5>\n<pre>wget http:\/\/swupdate.openvpn.org\/as\/openvpn-as-2.1.4-Debian8.amd_64.deb\nsudo dpkg -i openvpn-as-2.1.4-Debian8.amd_64.deb<\/pre>\n<h5>Ubuntu\u00a014<\/h5>\n<pre>wget http:\/\/swupdate.openvpn.org\/as\/openvpn-as-2.1.4-Ubuntu14.amd_64.deb\nsudo dpkg -i openvpn-as-2.1.4-Ubuntu14.amd_64.deb<\/pre>\n<h5>CentOS 7<\/h5>\n<p>OpenVPN requires the\u00a0<em>ifconfig<\/em>\u00a0-network utility, which can be installed along with the\u00a0<em>net-tools<\/em>.<\/p>\n<pre>sudo yum install net-tools\ncurl -O http:\/\/swupdate.openvpn.org\/as\/openvpn-as-2.1.4-CentOS7.x86_64.rpm\nsudo rpm -i openvpn-as-2.1.4-CentOS7.x86_64.rpm<\/pre>\n<p>With CentOS 7 you will also need to make the following changes to\u00a0<em>firewalld<\/em>.<\/p>\n<pre>sudo firewall-cmd --add-service=https --permanent\nsudo firewall-cmd --add-port=943\/tcp --permanent\nsudo firewall-cmd --add-masquerade\u00a0--permanent\nsudo firewall-cmd --reload<\/pre>\n<p>Once the installation is complete, you will see output similar to the example below. You can then continue ahead with configuring your new VPN server.<\/p>\n<pre>The Access Server has been successfully installed in \/usr\/local\/openvpn_as\nConfiguration log file has been written to \/usr\/local\/openvpn_as\/init.log\nPlease enter \"passwd openvpn\" to set the initial\nadministrative password, then login as \"openvpn\" to continue\nconfiguration here: https:\/\/&lt;public IP&gt;:943\/admin\nTo reconfigure manually, use the \/usr\/local\/openvpn_as\/bin\/ovpn-init tool.<\/pre>\n<h2>Configuring the Access Server<\/h2>\n<p>Like mentioned towards the end of the installation output, you will need to set a password for the default user to log into the AS. Set a new password for the user\u00a0<em>openvpn<\/em>\u00a0with the command underneath. Make sure the password is secure as the control panel\u00a0is accessible from the public internet by default.<\/p>\n<pre>sudo passwd openvpn<\/pre>\n<p>With the password set, open the OpenVPN Access Server admin panel at the address specified by the installation output.<\/p>\n<pre>https:\/\/&lt;public IP&gt;:943\/admin<\/pre>\n<p>When opening the page for the first time, you will see a warning that your connection is not secure. This notice is normal as your web browser does not trust the OpenVPN self-signed SSL certificate by default. You will need to bypass the warning or add an exception on your web browser to continue to the login screen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1883\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ssl_sercurity_warning.png\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ssl_sercurity_warning.png 1000w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ssl_sercurity_warning-300x92.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ssl_sercurity_warning-768x234.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ssl_sercurity_warning-60x18.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/ssl_sercurity_warning-150x46.png 150w\" alt=\"ssl_sercurity_warning\" width=\"1000\" height=\"305\" \/><\/p>\n<p>Log in with the username\u00a0<em>openvpn<\/em>\u00a0and the password you assigned. Once in, you will see the OpenVPN status page similar to the image below.<\/p>\n<p>On the Status Overview, you can find a summary of the server settings and a start\/stop -button to turn the VPN server on or off. At the right side panel, is an\u00a0<i>At a glance<\/i>\u00a0server and connections status.\u00a0The OpenVPN Access Server allows two concurrent users for free.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1875\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/status_overview.png\" sizes=\"auto, (max-width: 1048px) 100vw, 1048px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/status_overview.png 1048w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/status_overview-300x119.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/status_overview-768x303.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/status_overview-1024x405.png 1024w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/status_overview-60x24.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/status_overview-150x59.png 150w\" alt=\"status_overview\" width=\"1048\" height=\"414\" \/><\/p>\n<h4>User Management<\/h4>\n<p>Once logged in, open the\u00a0<em>User Permissions<\/em>\u00a0-tab under\u00a0<em>User Management<\/em>.\u00a0OpenVPN AS uses the same account credentials as the Linux server it is hosted on, this allows access control based on the user and group permissions defined in the control panel.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1885\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/adding_user.png\" sizes=\"auto, (max-width: 1048px) 100vw, 1048px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/adding_user.png 1048w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/adding_user-300x108.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/adding_user-768x277.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/adding_user-1024x369.png 1024w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/adding_user-60x22.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/adding_user-150x54.png 150w\" alt=\"adding_user\" width=\"1048\" height=\"378\" \/><\/p>\n<p>To make connecting and logging in easier, you should add your username to the\u00a0<em>User Permissions<\/em>\u00a0-table.<\/p>\n<ul>\n<li>Type your username in the\u00a0<em>New Username<\/em>\u00a0-field, select the admin permissions and auto-login if you wish, then press the\u00a0<em>Save Settings<\/em>\u00a0-button.<\/li>\n<li>After making changes to the OpenVPN\u00a0AS, restart the server to apply the new configuration by pressing the\u00a0<em>Update Running Server<\/em>\u00a0-button.<\/li>\n<li>You can then log out from the control panel with the link at the top right corner, and back in again with your username and password.<\/li>\n<\/ul>\n<p>For improved security, you might wish to lock the default user account; this can be done with the\u00a0<em>passwd<\/em>\u00a0-terminal command show below using the\u00a0<em>-l<\/em>\u00a0parameter. The same command with parameter\u00a0<em>-u<\/em>\u00a0will unlock the account later if needed.<\/p>\n<pre>passwd openvpn -l<\/pre>\n<p>You can also control user specific IP address settings under User Permissions by clicking the\u00a0<em>Show<\/em>\u00a0-link to open the advanced options. These settings allow you to assign a static IP address to each user, choose between NAT and routing, define the networks the users should have access to, configure a VPN Gateway, or setup a DMZ addresses that allow connections to the client through the public IP of the VPN server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1876\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/user_ip_settings.png\" sizes=\"auto, (max-width: 1048px) 100vw, 1048px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/user_ip_settings.png 1048w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/user_ip_settings-300x232.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/user_ip_settings-768x594.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/user_ip_settings-1024x791.png 1024w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/user_ip_settings-60x46.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/user_ip_settings-150x116.png 150w\" alt=\"user_ip_settings\" width=\"1048\" height=\"810\" \/><\/p>\n<p>If you are possibly\u00a0going to have more than a couple of users connecting to the VPN, you might wish to define the permissions on the group level. Create a user group on your cloud server and add the same group name to the\u00a0<em>Group Permissions<\/em>\u00a0list, you can then give access to users directly from your server terminal, adding them to the authorised\u00a0user group, without needing to add every user manually in the web admin panel.<\/p>\n<h4>Server Network Settings<\/h4>\n<p>The IP settings can be configured in the\u00a0<em>Server Network Settings<\/em>\u00a0under\u00a0<em>Configurations<\/em>\u00a0-menu. By default, the AS listens for incoming connections on the first network interface, but if you have multiple public IP addresses, it is possible to select between the interfaces or to listen on all of them.<\/p>\n<p>In the VPN Server settings, you will find the hostname, IP addresses and protocols, as well as the port numbers all easily configured straight from the control panel.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1887 size-full\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/server_network_settings-1.png\" sizes=\"auto, (max-width: 1048px) 100vw, 1048px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/server_network_settings-1.png 1048w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/server_network_settings-1-300x275.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/server_network_settings-1-768x705.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/server_network_settings-1-1024x940.png 1024w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/server_network_settings-1-60x55.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/server_network_settings-1-150x138.png 150w\" width=\"1048\" height=\"962\" \/><\/p>\n<p>If you have a valid domain name configured for your server, you can set the hostname to the\u00a0<em>Hostname or IP Address<\/em>\u00a0-field to allow the AS to validate the configuration in the\u00a0<em>Web Server<\/em>\u00a0-settings. The hostname also sets the server address in the AS generated profiles. Keep it set to the IP address the server is listening if you do not have a DNS record pointing to the server\u2019s IP.<\/p>\n<p>Next are the\u00a0IP address settings for the\u00a0Admin Web control panel and port selection. Be careful when making changes to the admin IPs not to lock yourself out from the admin panel by changing the IP to something unreachable.\u00a0In such case, it is possible to reconfigure the AS manually at your cloud server side using the\u00a0<em>\/usr\/local\/openvpn_as\/bin\/ovpn-init<\/em>\u00a0-tool as mentioned in the installation output.<\/p>\n<h4>Advanced VPN<\/h4>\n<p>With the basic configuration set, go to the Advanced VPN settings and scroll down to the bottom of the page. Here you will find the Additional OpenVPN Config Directives that allow you to specify additional server and client options.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3528\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/additional_config_directives.png\" sizes=\"auto, (max-width: 1044px) 100vw, 1044px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/additional_config_directives.png 1044w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/additional_config_directives-300x126.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/additional_config_directives-768x323.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/additional_config_directives-1024x431.png 1024w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/additional_config_directives-60x25.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/additional_config_directives-150x63.png 150w\" alt=\"Additional Config Directives\" width=\"1044\" height=\"439\" \/><\/p>\n<p>To improve the server-client encryption, include the following\u00a0cipher and authentication options in both directives as shown above and then click the Save Settings button.<\/p>\n<pre>cipher AES-256-CBC\nauth SHA256<\/pre>\n<p>Remember to reload the server with the prompt at the top of the page as well.<\/p>\n<h2>Connecting to the\u00a0Access Server<\/h2>\n<p>For Mac and Windows users, the easiest way to set up a\u00a0VPN client is to use the OpenVPN Connect. It can be installed directly from your Access Server\u00a0and allows connecting to the VPN by logging in through the web portal. Linux users should use the OpenVPN client available through their system package manager.<\/p>\n<p>Open the web connection login page on your browser. By default, the connection page can be found at the port 943 of your cloud server. You can use either the public IP address or domain name if you have one configured. Note that the connection needs to use HTTPS.<\/p>\n<pre>https:\/\/&lt;server IP\/domain&gt;:943<\/pre>\n<p>Opening the address\u00a0will show a warning that your connection is not trusted. Acknowledge the warning and proceed to sign in with your username and password.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1878\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/logging_in.png\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/logging_in.png 1000w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/logging_in-300x126.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/logging_in-768x323.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/logging_in-60x25.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/logging_in-150x63.png 150w\" alt=\"logging_in\" width=\"1000\" height=\"420\" \/><\/p>\n<h4>Mac and Windows<\/h4>\n<p>After logging in, click the link to continue. It will start a\u00a0download for the Connect -client.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1879 size-full\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/connecting.png\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/connecting.png 1000w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/connecting-300x132.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/connecting-768x338.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/connecting-60x26.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/connecting-150x66.png 150w\" alt=\"connecting\" width=\"1000\" height=\"440\" \/><\/p>\n<p>Install the client software, while keeping the OpenVPN connection page open. Follow the instructions in the installation wizard, and allow the application to connect to an untrusted SSL certificate when asked.<\/p>\n<p>When the installation is complete, the client will automatically connect to the VPN and the login page will update to show the connection details. You can close the browser tab without interrupting the VPN,\u00a0but it can be helpful for disconnecting from the Access Server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1891\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/vpn_connected.png\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/vpn_connected.png 1000w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/vpn_connected-300x131.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/vpn_connected-768x336.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/vpn_connected-60x26.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/vpn_connected-150x66.png 150w\" alt=\"vpn_connected\" width=\"1000\" height=\"437\" \/><\/p>\n<h4>Linux<\/h4>\n<p>When logged it, you will be greeted by a list of connection options and a profile download shortcut, click the\u00a0<em>Yourself (user-locked profile)<\/em>\u00a0-link to download your OpenVPN profile.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1881\" src=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/download_config.png\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" srcset=\"https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/download_config.png 1000w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/download_config-300x145.png 300w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/download_config-768x370.png 768w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/download_config-60x29.png 60w, https:\/\/www.upcloud.com\/support\/wp-content\/uploads\/2016\/05\/download_config-150x72.png 150w\" alt=\"download_config\" width=\"1000\" height=\"482\" \/><\/p>\n<p>Save the file anywhere you can find it later, e.g. in your\u00a0<em>~\/<\/em>\u00a0home directory.<\/p>\n<p>OpenVPN client for most distributions can be installed from the standard repositories.<\/p>\n<pre># Debian and Ubuntu\nsudo apt-get install openvpn\n# CentOS\nsudo yum install openvpn<\/pre>\n<p>That is all that is need; you can then connect to the Access Server with the command below where the\u00a0<em>~\/client.ovpn<\/em>\u00a0is your profile saved in your home directory. Enter your username and password when prompted.<\/p>\n<pre>sudo openvpn --config ~\/client.ovpn<\/pre>\n<p>When the VPN is up and running, you will see an output message\u00a0like the one below, a timestamp and a confirmation that the connection was successful.<\/p>\n<pre>Tue Apr 26 04:17:24 2016 Initialization Sequence Completed<\/pre>\n<p>Keep the terminal open while you wish to remain connected to the OpenVPN server. You can disconnect at any time by stopping the client with\u00a0<em>Ctrl+c<\/em>\u00a0or by closing the terminal window.<\/p>\n<h2>Testing your connection<\/h2>\n<p>With the VPN connection up and running, you should check that everything is working as expected. First, make sure you have access to the internet. If that works, you should test where you are connecting. Below are a couple of easy ways to verify that your connection is being routed through the OpenVPN Access Server.<\/p>\n<h4>Your IP to the internet<\/h4>\n<p>When connected to a VPN, your network traffic first goes through the VPN server before heading to its real destination. For anyone else on the internet, it seems though your requests originate from your AS. Many online services can show the source address of your connection. One such is Google search for \u201cmy ip\u201d, you can use the link below for a shortcut.<\/p>\n<p><a href=\"https:\/\/www.google.com\/search?q=my+ip\">https:\/\/www.google.com\/search?q=my+ip<\/a><\/p>\n<p>If the IP address displayed above the search results matches that of your server\u2019s public IP address, the VPN is routing correctly.<\/p>\n<h4>Using the private IP addresses<\/h4>\n<p>UpCloud servers have a private IP address only accessible to the cloud servers on your account. While connected through a VPN, your client is essentially linked to the server\u2019s private network, but only on that host. As such you should be able to reach the VPN server\u2019s private IP address, which is listed at your\u00a0<a href=\"https:\/\/my.upcloud.com\/network\">UpCloud Control Panel<\/a>\u00a0under\u00a0<em>Network<\/em>\u00a0-menu and\u00a0<em>Private Network<\/em>\u00a0-tab.<\/p>\n<p>You can test the connections for example with\u00a0<em>ping<\/em>\u00a0-command in your client computer\u2019s terminal or command prompt.<\/p>\n<pre>ping &lt;private IP&gt;<\/pre>\n<p>If you get a reply, your OpenVPN Access Server is working and you can use the private IP address on your VPN server for other connections.<\/p>\n<p>Note that CentOS and other Red Hat variants might block ICMP requests at their firewall by default, in such case, you can test the routing with SSH instead.<\/p>\n<h2>Conclusions<\/h2>\n<p>Having your personal VPN server can provide many advantages from improved security and privacy to the convenience of a fixed IP or a local area network between computers on different continents. OpenVPN Access Server is capable of much more than could be explained in a simple start-up guide. If you wish to learn more about the various configuration options, check out their\u00a0<a href=\"https:\/\/openvpn.net\/images\/pdf\/OpenVPN_Access_Server_Sysadmin_Guide_Rev.pdf\">Sysadmin Guide to OpenVPN AS<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Virtual private network or VPN for short is a convenient way of setting up a secure connection to another networked [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-336","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}