{"id":16212,"date":"2019-03-27T08:50:12","date_gmt":"2019-03-27T08:50:12","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=16212"},"modified":"2025-04-28T08:08:17","modified_gmt":"2025-04-28T08:08:17","slug":"how-to-set-up-a-linux-vpn-server-with-openvpn","status":"publish","type":"post","link":"\/uk\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn","title":{"rendered":"Set up a Linux VPN Server Using OpenVPN: Connecting to Devices and Managing VPN"},"content":{"rendered":"<p>A Virtual Private Network (VPN) secures users by creating a point-to-point connection that masks their internet traffic. Although paid VPN services are widely available, you may want to set up your own Linux VPN server with OpenVPN, a popular open-source option.<\/p><p>This tutorial will show you how to set up a Linux VPN server using OpenVPN. We will explain two methods &ndash; manual and automatic, using Hostinger&rsquo;s operating system template.<\/p><p>You will also learn how to manage and test the tunnelling functionality. Moreover, we will also explain how to connect devices running various operating systems to the Linux VPN server.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet-1024x283.png\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-1536x425.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-300x83.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-150x41.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-768x212.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-why-should-you-use-a-linux-vpn-server\">Why Should You Use a Linux VPN Server<\/h2><p>Using a VPN for Linux desktops and <a href=\"\/uk\/tutorials\/what-is-vps-hosting\">virtual private servers<\/a> (VPSs) is one of the best ways to remain secure over the internet. Here are the key benefits of a Linux VPN server:<\/p><ul class=\"wp-block-list\">\n<li><strong>Security <\/strong>&ndash; A VPN&rsquo;s data encryption provides a higher <a href=\"\/uk\/tutorials\/vps-security\">VPS security<\/a> level than a firewall. For example, the VPN will securely encrypt sensitive data like transactions.<\/li>\n\n\n\n<li><strong>Remote access<\/strong> &ndash; many organizations only allow remote access through VPN to maintain security.<\/li>\n\n\n\n<li><strong>Anonymity <\/strong>&ndash; a VPN masks a user&rsquo;s actual IP address and perceived location from other parties, including the internet service provider (ISP). This ensures anonymity when browsing the internet.<\/li>\n\n\n\n<li><strong>Unblock content <\/strong>&ndash; some VPNs let you bypass region-locked content. For instance, you may be able to access another Netflix locale&rsquo;s library.<\/li>\n\n\n\n<li><strong>Bypass ISP throttling<\/strong> &ndash; certain ISPs throttle internet speed and bandwidth. A VPN may be able to stop ISP throttling.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-how-to-install-openvpn-on-a-linux-vpn-server\">How to Install OpenVPN on a Linux VPN Server<\/h2><p>In this section, we will demonstrate how to set up OpenVPN software on a VPS using an operating system template and commands. As both methods have the same outcome, choose whichever you prefer.<\/p><h3 class=\"wp-block-heading\">Prerequisites<\/h3><p>To set up a Linux VPN server, ensure you have a compatible machine. While you can set it up on a local system, we recommend using a VPS hosting service since it is more affordable and simpler to manage.<\/p><p>When choosing a VPS hosting plan, ensure it works with your chosen software. For example, <a href=\"\/uk\/vps-hosting\">Hostinger KVM plans<\/a> support various VPN solutions, providing flexibility and options for your needs.<\/p><p>In addition, your VPS must be accessible remotely via SSH and offer full root access to ensure a smooth installation process. At Hostinger, users can run commands on their server directly using the <a href=\"https:\/\/support.hostinger.com\/en\/articles\/7978544-how-to-use-the-browser-terminal\" target=\"_blank\" rel=\"noopener\">Browser Terminal<\/a> feature.<\/p><p>Lastly, your system must allow <strong>TCP over port 943<\/strong> and <strong>UDP on port 1194<\/strong> via iptables or <a href=\"\/uk\/tutorials\/how-to-configure-firewall-on-ubuntu-using-ufw\/\">Uncomplicated Firewall<\/a> (UFW). If you use Hostinger, you can do so by simply <a href=\"https:\/\/support.hostinger.com\/en\/articles\/8172641-how-to-use-vps-firewall\" target=\"_blank\" rel=\"noopener\">creating VPS firewall rules via hPane<strong>l<\/strong><\/a>.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/uk\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-300x88.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-150x44.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>Before proceeding with the VPN server installation, we recommend reading the <a href=\"https:\/\/openvpn.net\/vpn-server-resources\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVPN documentation<\/a> to learn more about the protocol.<\/p><h3 class=\"wp-block-heading\" id=\"h-set-up-a-linux-vpn-server-with-openvpn-access-server\">Set Up a Linux VPN Server With OpenVPN Access Server<\/h3><p>To manually set up OpenVPN on a Linux server, connect to your system using an <a href=\"\/uk\/tutorials\/how-to-use-putty-ssh\">SSH client like PuTTY<\/a> or Hostinger&rsquo;s <strong>Browser terminal<\/strong>. Find the login credentials under the <strong>SSH access <\/strong>tab on<strong> hPanel&rsquo;s VPS overview <\/strong>menu.<\/p><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> Instead of using <strong>root<\/strong>, switch to another account with superuser privileges when managing your server to avoid accidental destructive command execution.<\/p><\/div>\n\n\n\n<\/p><p>Then, run the installation commands depending on your distribution:<\/p><p><strong>Ubuntu and Debian<\/strong> <strong>derivatives<\/strong><\/p><ol class=\"wp-block-list\">\n<li>Update the indexes using the following <a href=\"\/uk\/tutorials\/linux-commands\">Linux command<\/a>:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo apt update<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>A<strong> net-tools <\/strong>package is needed to install OpenVPN successfully. If you don&rsquo;t have it installed yet, enter the following command:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo apt -y install ca-certificates wget net-tools gnupg<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Download the client from the <a href=\"https:\/\/openvpn.net\/vpn-software-packages\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVPN website<\/a>. Copy the package link and download it using the <strong>wget <\/strong>command. A sample <strong>wget<\/strong> command for Ubuntu would look like this:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">wget -qO - https:\/\/as-repository.openvpn.net\/as-repo-public.gpg | apt-key add -<\/pre><ol start=\"4\" class=\"wp-block-list\">\n<li>Proceed with the command below:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">echo \"deb http:\/\/as-repository.openvpn.net\/as\/debian focal main\"&gt;\/etc\/apt\/sources.list.d\/openvpn-as-repo.list<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>Lastly, install the OpenVPN Access Server with the following command:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo apt update &amp;&amp; apt -y install openvpn-as<\/pre><p><strong>CentOS<\/strong> <strong>and RHEL derivatives<\/strong><\/p><p>OpenVPN installation for CentOS is simpler because it only consists of two commands:<\/p><pre class=\"wp-block-preformatted\">yum -y install https:\/\/as-repository.openvpn.net\/as-repo-centos9.rpm<br>yum -y install openvpn-as<\/pre><p>Remember, the package URL differs if you are using other Red Hat Enterprise Linux (RHEL) derivatives. <\/p><p>Once the installation is complete, you will see the Admin UI and the Client UI details. Remember the password since you will use it to log in.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-terminal-window-displays-a-successful-OpenVPN-Access-server-installation.-Login-URLs-for-admin-and-client-along-with-password-and-username-is-shown.jpg\"><img decoding=\"async\" width=\"1024\" height=\"293\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-terminal-window-displays-a-successful-OpenVPN-Access-server-installation.-Login-URLs-for-admin-and-client-along-with-password-and-username-is-shown-1024x293.jpg\" alt=\"The terminal window displays a successful OpenVPN Access server installation. Login URLs for admin and client, along with password and username, is shown\" class=\"wp-image-76073\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-terminal-window-displays-a-successful-OpenVPN-Access-server-installation.-Login-URLs-for-admin-and-client-along-with-password-and-username-is-shown.jpg 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-terminal-window-displays-a-successful-OpenVPN-Access-server-installation.-Login-URLs-for-admin-and-client-along-with-password-and-username-is-shown-300x86.jpg 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-terminal-window-displays-a-successful-OpenVPN-Access-server-installation.-Login-URLs-for-admin-and-client-along-with-password-and-username-is-shown-150x43.jpg 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-terminal-window-displays-a-successful-OpenVPN-Access-server-installation.-Login-URLs-for-admin-and-client-along-with-password-and-username-is-shown-768x220.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h3 class=\"wp-block-heading\">Set Up a Linux VPN Server With Hostinger OpenVPN VPS Template<\/h3><p>Installing OpenVPN might be complicated for VPS or Linux beginners as it requires executing various commands. However, Hostinger users can easily do so in one click <a href=\"https:\/\/support.hostinger.com\/en\/articles\/4965922-how-to-change-the-operating-system-of-vps\" target=\"_blank\" rel=\"noopener\">using an operating system template<\/a>, which is bundled with an application or control panel.<\/p><p>In addition to being simple, this method is safer since you won&rsquo;t run wrong commands that might break your server. We provide <a href=\"https:\/\/support.hostinger.com\/en\/articles\/1583571-what-are-the-available-operating-systems-for-vps\" target=\"_blank\" rel=\"noopener\">different VPS operating system templates<\/a> pre-installed with various software.<\/p><p>For example, we offer the <strong>Ubuntu 22.04 64bit with OpenVPN <\/strong>template. Follow these steps to install it:<\/p><ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/hpanel.hostinger.com\/\" target=\"_blank\" rel=\"noopener\">Log in to <strong>hPanel<\/strong><\/a> and click<strong> VPS <\/strong>on the top menu.<\/li>\n\n\n\n<li>Select the VPS you want to install OpenVPN on.<\/li>\n\n\n\n<li>Navigate to the sidebar &rarr; <strong>OS &amp; Panels <\/strong>&rarr; <strong>Operating System<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Applications<\/strong>.<\/li>\n\n\n\n<li>Select <strong>OpenVPN<\/strong> from the list and click <strong>Change OS<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69dfd580a2247\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"233\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/the-openvpn-vps-template-on-hpanel-operating-system-installation-page-1024x233.png\" alt=\"The OpenVPN template on hPanel's VPS operating system configuration menu\" class=\"wp-image-125837\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/the-openvpn-vps-template-on-hpanel-operating-system-installation-page-1024x233.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/the-openvpn-vps-template-on-hpanel-operating-system-installation-page-300x68.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/the-openvpn-vps-template-on-hpanel-operating-system-installation-page-150x34.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/the-openvpn-vps-template-on-hpanel-operating-system-installation-page-768x175.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/the-openvpn-vps-template-on-hpanel-operating-system-installation-page.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Wait until the process is complete, which should take a few minutes. During the installation, you can&rsquo;t access or modify your server.<\/p><p>\n\n\n    <p class=\"warning\">\n        <strong>Warning!<\/strong> Back up your VPS data before changing or reinstalling its operating system as the process will wipe all the data.    <\/p>\n    \n\n\n\n<\/p><p>Remember, you can only use <strong>Ubuntu 22.04<\/strong> if you install OpenVPN using this method. To run other distributions, you must set up the application and operating system separately using commands.<\/p><h2 class=\"wp-block-heading\" id=\"h-set-up-openvpn-dashboard-and-account\">Set Up OpenVPN Dashboard and Account<\/h2><p>Regardless of the installation method, you must configure the OpenVPN settings and account via the admin dashboard to complete the setup process. Here are the steps:<\/p><ol class=\"wp-block-list\">\n<li>Open the admin URL using your VPS IP address with <strong>943<\/strong> port and<strong> \/admin <\/strong>subdomain. For example, it should look like <strong>https:\/\/185.185.185.185:943\/admin<\/strong>.<\/li>\n\n\n\n<li>On the login page, enter the credentials shown in Terminal during the installation steps. If you use the template, enter <strong>openvpn <\/strong>as the username and use the password you provided when setting up the operating system. Click <strong>Sign In<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-login-page.png\"><img decoding=\"async\" width=\"954\" height=\"888\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-login-page.png\" alt=\"The main OpenVPN login page\" class=\"wp-image-76074\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-login-page.png 954w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-login-page-300x279.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-login-page-150x140.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-login-page-768x715.png 768w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/a><\/figure><\/div><p>\n\n<div class=\"protip\">\n                    <h4 class=\"title\"> Pro Tip<\/h4>\n                    <p>If you see the <a href=\"\/uk\/tutorials\/your-connection-is-not-private-error\">Your connection is not private error<\/a>, an SSL certificate may not be installed on the VPS server. Click <strong>Continue to the site<\/strong> to proceed to the web interface.<\/p>\n                <\/div>\n\n\n\n<\/p><ol start=\"3\" class=\"wp-block-list\">\n<li>Once logged in, you will see a Terms and Conditions page. Read it and press the <strong>Agree<\/strong> button to proceed. The next page will provide the OpenVPN configuration details and the server status.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-Status-Overview-page-on-OpenVPN-Access-Server-dashboard.png\"><img decoding=\"async\" width=\"1024\" height=\"399\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-Status-Overview-page-on-OpenVPN-Access-Server-dashboard-1024x399.png\" alt=\"The Status Overview page on OpenVPN Access Server dashboard\" class=\"wp-image-76075\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-Status-Overview-page-on-OpenVPN-Access-Server-dashboard.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-Status-Overview-page-on-OpenVPN-Access-Server-dashboard-300x117.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-Status-Overview-page-on-OpenVPN-Access-Server-dashboard-150x58.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-Status-Overview-page-on-OpenVPN-Access-Server-dashboard-768x299.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Click the <strong>Start VPN services <\/strong>button on the OpenVPN Admin panel. The VPN service status should show as <strong>ON<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-status-overview-page-on-OpenVPN-dashboard-it-showcases-that-VPN-services-are-currently-ON.png\"><img decoding=\"async\" width=\"1024\" height=\"132\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-status-overview-page-on-OpenVPN-dashboard-it-showcases-that-VPN-services-are-currently-ON-1024x132.png\" alt=\"The status overview page on OpenVPN dashboard, it showcases that VPN services are currently ON\" class=\"wp-image-76077\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-status-overview-page-on-OpenVPN-dashboard-it-showcases-that-VPN-services-are-currently-ON.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-status-overview-page-on-OpenVPN-dashboard-it-showcases-that-VPN-services-are-currently-ON-300x39.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-status-overview-page-on-OpenVPN-dashboard-it-showcases-that-VPN-services-are-currently-ON-150x19.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-status-overview-page-on-OpenVPN-dashboard-it-showcases-that-VPN-services-are-currently-ON-768x99.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"5\" class=\"wp-block-list\">\n<li>The default OpenVPN settings are sufficient for normal use and compatible with macOS, Linux, Windows, Android, and iOS. However, if you want to tweak your Linux VPN server configuration, click <strong>Apply <\/strong>and <strong>Update Running Server<\/strong> to enable the changes.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/A-window-from-the-OpenVPN-dashboard-whenever-a-user-changes-settings.-Update-running-server-button-is-highlighted.png\"><img decoding=\"async\" width=\"1024\" height=\"283\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/A-window-from-the-OpenVPN-dashboard-whenever-a-user-changes-settings.-Update-running-server-button-is-highlighted-1024x283.png\" alt=\"A window from the OpenVPN dashboard whenever a user changes settings. Update running server button is highlighted\" class=\"wp-image-76079\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/A-window-from-the-OpenVPN-dashboard-whenever-a-user-changes-settings.-Update-running-server-button-is-highlighted-1024x283.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/A-window-from-the-OpenVPN-dashboard-whenever-a-user-changes-settings.-Update-running-server-button-is-highlighted-300x83.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/A-window-from-the-OpenVPN-dashboard-whenever-a-user-changes-settings.-Update-running-server-button-is-highlighted-150x41.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/A-window-from-the-OpenVPN-dashboard-whenever-a-user-changes-settings.-Update-running-server-button-is-highlighted-768x212.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/A-window-from-the-OpenVPN-dashboard-whenever-a-user-changes-settings.-Update-running-server-button-is-highlighted.png 1354w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>\n\n<div><p class=\"important\"><strong>Important!<\/strong> Keep in mind that the free version of OpenVPN allows <strong>up to two concurrent connections<\/strong> only.<\/p><\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-set-up-openvpn-server-tunneling\">Set Up OpenVPN Server Tunneling<\/h2><p>A VPN tunnel is an encrypted connection between your device and the VPN. Follow these steps to enable it:<\/p><ol class=\"wp-block-list\">\n<li>To enable IP forwarding in your kernel, turn on traffic forwarding over IPv4 using the following command:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">echo 'net.ipv4.ip_forward=1' | sudo tee -a \/etc\/sysctl.d\/99-sysctl.conf<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>To apply the changes, enter:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo sysctl -p<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Since the OpenVPN tunnel does not support simultaneous connections over IPv6 and IPv4 protocols, disable the latter by running these commands subsequently:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1<\/pre><pre class=\"wp-block-preformatted\">sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1<\/pre><ol start=\"4\" class=\"wp-block-list\">\n<li>To ensure IPv6 is disabled, turn it off manually by modifying the<strong> 99-sysctl.conf<\/strong> file in <strong>\/etc\/sysctl.d\/ <\/strong><a href=\"\/uk\/tutorials\/how-to-install-and-use-nano-text-editor\">using a text editor like <strong>nano<\/strong>.<\/a> To do so, run the following commands:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo cd \/etc\/sysctl.d\/<\/pre><pre class=\"wp-block-preformatted\">sudo nano 99-sysctl.conf<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>Set the following parameters inside the file. Press<strong> Ctrl + X<\/strong>, <strong>Y<\/strong>, and <strong>Enter <\/strong>to save the changes.<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">net.ipv6.conf.all.disable_ipv6 = 1<\/pre><pre class=\"wp-block-preformatted\">net.ipv6.conf.default.disable_ipv6 = 1<\/pre><pre class=\"wp-block-preformatted\">net.ipv6.conf.lo.disable_ipv6 = 1<\/pre><ol start=\"6\" class=\"wp-block-list\">\n<li>Activate the new settings using this command:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sysctl -p<\/pre><ol start=\"7\" class=\"wp-block-list\">\n<li>Open the <strong>\/etc\/hosts<\/strong> file using nano and add a hash sign (<strong>#<\/strong>) at the start of the IPv6 resolution line as shown below:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">#::1 localhost ip6-localhost ip6-loopback<\/pre><ol start=\"8\" class=\"wp-block-list\">\n<li>Log in to the<strong> OpenVPN admin dashboard <\/strong>and open <strong>VPN Settings<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/03\/openvpn-vpn-settings-menu.jpg\"><img decoding=\"async\" width=\"309\" height=\"621\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/03\/openvpn-vpn-settings-menu.jpg\" alt=\"OpenVPN dashboard side bar with VPN Settings button selected\" class=\"wp-image-105873\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/03\/openvpn-vpn-settings-menu.jpg 309w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/03\/openvpn-vpn-settings-menu-149x300.jpg 149w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/03\/openvpn-vpn-settings-menu-75x150.jpg 75w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/a><\/figure><\/div><ol start=\"9\" class=\"wp-block-list\">\n<li>In the <strong>Routing <\/strong>section, set the <strong>Should VPN clients have access to private subnets (non-public networks on the server side)? <\/strong>option to <strong>No<\/strong>. Then, set the <strong>Should client Internet traffic be routed through the VPN? <\/strong>option to <strong>Yes<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-routing-section-on-the-OpenVPN-dashboard.png\"><img decoding=\"async\" width=\"1024\" height=\"220\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-routing-section-on-the-OpenVPN-dashboard-1024x220.png\" alt=\"The routing section on the OpenVPN dashboard\" class=\"wp-image-76081\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-routing-section-on-the-OpenVPN-dashboard.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-routing-section-on-the-OpenVPN-dashboard-300x65.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-routing-section-on-the-OpenVPN-dashboard-150x32.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-routing-section-on-the-OpenVPN-dashboard-768x165.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"10\" class=\"wp-block-list\">\n<li>To avoid any DNS leak, alter the DNS resolver settings. Enable the <strong>Have clients use the same DNS servers <\/strong>option.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-DNS-settings-section-on-the-OpenVPN-dashboard.png\"><img decoding=\"async\" width=\"1024\" height=\"234\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-DNS-settings-section-on-the-OpenVPN-dashboard-1024x234.png\" alt=\"The DNS settings section on the OpenVPN dashboard\" class=\"wp-image-76082\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-DNS-settings-section-on-the-OpenVPN-dashboard.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-DNS-settings-section-on-the-OpenVPN-dashboard-300x69.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-DNS-settings-section-on-the-OpenVPN-dashboard-150x34.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-DNS-settings-section-on-the-OpenVPN-dashboard-768x176.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"11\" class=\"wp-block-list\">\n<li>Save the new settings and click <strong>Update Running Server<\/strong>.<\/li>\n\n\n\n<li>Navigate to the <strong>Status <\/strong>tab. Click <strong>Stop<\/strong> and then <strong>Start<\/strong> to reboot the OpenVPN server.<\/li>\n<\/ol><h2 class=\"wp-block-heading\" id=\"h-how-to-connect-linux-vpn-server-to-other-devices\">How to Connect Linux VPN Server to Other Devices<\/h2><p>Now that the server is running, users can connect devices to it. We&rsquo;ll cover the most popular operating system options: Windows, macOS, Linux, Android, and iOS.<\/p><h3 class=\"wp-block-heading\">How to Install and Connect the OpenVPN Client for Windows<\/h3><ol class=\"wp-block-list\">\n<li>Open the OpenVPN client URL: <a href=\"https:\/\/185.185.185.185:943\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>https:\/\/185.185.185.185:943\/<\/strong><\/a>. Replace the IP address with your VPS&rsquo;.<\/li>\n\n\n\n<li>Choose the Windows version of the client and run the installation.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-Windows-machine.png\"><img decoding=\"async\" width=\"520\" height=\"504\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-Windows-machine.png\" alt=\"The main OpenVPN client dashboard view for a Windows machine\" class=\"wp-image-76084\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-Windows-machine.png 520w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-Windows-machine-300x291.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-Windows-machine-150x145.png 150w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/a><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Once the installation is complete, a prompt will appear. Enter your OpenVPN username and password.<\/li>\n\n\n\n<li>Run OpenVPN from the Windows taskbar to disconnect, reconnect and view the connection status.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-how-to-install-and-connect-the-openvpn-client-for-macos\">How to Install and Connect the OpenVPN Client for macOS<\/h3><ol class=\"wp-block-list\">\n<li>Connect to the OpenVPN client UI and <a href=\"https:\/\/openvpn.net\/client-connect-vpn-for-mac-os\/\" target=\"_blank\" rel=\"noreferrer noopener\">download the OpenVPN Connect software for macOS<\/a>..<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-macOS-machine.png\"><img decoding=\"async\" width=\"952\" height=\"994\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-macOS-machine.png\" alt=\"The main OpenVPN client dashboard view for a macOS machine\" class=\"wp-image-76085\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-macOS-machine.png 952w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-macOS-machine-287x300.png 287w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-macOS-machine-144x150.png 144w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-for-a-macOS-machine-768x802.png 768w\" sizes=\"(max-width: 952px) 100vw, 952px\" \/><\/a><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Follow the macOS setup wizard procedure to complete the installation.<\/li>\n\n\n\n<li>A new OpenVPN icon on the macOS taskbar will appear. Right-click on this icon to see the different options.<\/li>\n\n\n\n<li>Click the <strong>Connect to<\/strong> option. A pop-up will prompt for your OpenVPN username and password. Enter the credentials.<\/li>\n\n\n\n<li>Click <strong>Connect<\/strong> to establish the Linux VPN server connection.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-how-to-install-and-connect-the-openvpn-client-for-linux\">How to Install and Connect the OpenVPN Client for Linux<\/h3><p>The client installation for Linux differs from Windows and macOS since it requires commands. Open Terminal by pressing<strong> Ctrl + Alt + T<\/strong> and follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>Download and install the OpenVPN client software by running the package manager command. For Debian derivatives like Ubuntu, use:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo apt-get install openvpn<\/pre><p>Meanwhile, run the following if you use CentOS 9 Stream or older:<\/p><pre class=\"wp-block-preformatted\">sudo yum install openvpn<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Open the OpenVPN client UI and download the appropriate profile for your OS. You can also do so using the <a href=\"\/uk\/tutorials\/curl-command-with-examples-linux\/\"><strong>curl command<\/strong><\/a> with the download link.<\/li>\n\n\n\n<li>Copy the downloaded profile to <strong>\/etc\/openvpn<\/strong> and rename it to <strong>client.conf<\/strong>.<\/li>\n\n\n\n<li>Return to <strong>Terminal <\/strong>and start the OpenVPN Tunnel service by entering the following command:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo service openvpn start<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>A prompt asking for your OpenVPN username and password will appear. Enter the correct credentials.<\/li>\n\n\n\n<li>Once the VPN interface is available, <strong>tun0<\/strong> should show up in the existing network adapters list. To check it, run <strong>ipconfig<\/strong> or <strong>ip addr<\/strong> in <strong>Terminal<\/strong>.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-how-to-install-and-connect-the-openvpn-client-for-android\">How to Install and Connect the OpenVPN Client for Android<\/h3><p>To connect to your OpenVPN Linux server from an Android device, open<strong> Google Play<\/strong> and install the <strong>OpenVPN Connect <\/strong>application.<\/p><p>Import a profile by entering the VPN server client URL, namely your VPS IP address with the OpenVPN port. Then, enter the following details:<\/p><ul class=\"wp-block-list\">\n<li><strong>Port<\/strong> &ndash; 934 of your Linux VPN server.<\/li>\n\n\n\n<li><strong>Username<\/strong> &ndash; the username set on your server. It is openvpn by default.<\/li>\n\n\n\n<li><strong>Password<\/strong> &ndash; the password that Terminal displayed after successfully installing OpenVPN Access Server or the one you entered when setting up the VPS template.<\/li>\n<\/ul><p>Alternatively, use the client UI to import the <strong>OVPN<\/strong> file, which you must create first using the template within the <strong>\/etc\/openvpn\/easy-rsa<\/strong> directory on your VPS.<\/p><figure class=\"wp-block-image aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-client-dashboard-view-with-profile-download-option-highlighted.png\"><img decoding=\"async\" width=\"1008\" height=\"706\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-main-OpenVPN-client-dashboard-view-with-profile-download-option-highlighted.png\" alt=\"The main OpenVPN client dashboard view with profile download option highlighted\n\" class=\"wp-image-76086\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-with-profile-download-option-highlighted.png 1008w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-with-profile-download-option-highlighted-300x210.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-with-profile-download-option-highlighted-150x105.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-main-OpenVPN-client-dashboard-view-with-profile-download-option-highlighted-768x538.png 768w\" sizes=\"(max-width: 1008px) 100vw, 1008px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-how-to-install-and-connect-the-openvpn-client-for-ios\">How to Install and Connect the OpenVPN Client for iOS<\/h3><p>To connect the OpenVPN client on iOS, download the <strong>OpenVPN Connect <\/strong>application from the <strong>App Store<\/strong>. Open the application and fill in all the required profile information or upload the profile file.<\/p><p>Refer to the previous section for the complete steps since configuring OpenVPN Connect on iOS is similar to Android.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-manage-linux-vpn-server\">How to Manage Linux VPN Server<\/h2><p>Now that the VPN Access Server is running, check its configuration settings to ensure it works properly.<\/p><h3 class=\"wp-block-heading\" id=\"h-how-to-manage-linux-vpn-server-compression-settings\">How to Manage Linux VPN Server Compression Settings<\/h3><p>If you are connected to the VPN but cannot browse the Internet, check the OpenVPN logs at <strong>\/var\/log\/openvpnas.log<\/strong> on the Access Server VPS.<\/p><p>If you find entries similar to the ones below, you are likely experiencing compression issues:<\/p><pre class=\"wp-block-preformatted\">2022-03-23 18:24:05+0800 [-] OVPN 11 OUT: 'Mon Mar 23 08:59:05 2016 guest\/123.45.67.89:55385 Bad compression stub decompression header byte: 251'<\/pre><p>Resolve this error by disabling compression:<\/p><ol class=\"wp-block-list\">\n<li>Open the Admin console and click <strong>Advanced VPN<\/strong>.<\/li>\n\n\n\n<li>Go to <strong>Default Compression Settings<\/strong> and turn off <strong>Support compression on client VPN connections<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-default-compression-settings-on-a-OpenVPN-dashboard.png\"><img decoding=\"async\" width=\"1024\" height=\"145\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-default-compression-settings-on-a-OpenVPN-dashboard-1024x145.png\" alt=\"The default compression settings on a OpenVPN dashboard\" class=\"wp-image-76087\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-default-compression-settings-on-a-OpenVPN-dashboard.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-default-compression-settings-on-a-OpenVPN-dashboard-300x42.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-default-compression-settings-on-a-OpenVPN-dashboard-150x21.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-default-compression-settings-on-a-OpenVPN-dashboard-768x109.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Apply the changes and click on the <strong>Update Running Server<\/strong> option.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-how-to-add-users-to-a-linux-vpn-server-running-openvpn\">How to Add Users to a Linux VPN Server Running OpenVPN<\/h3><p>Although you can create multiple accounts, the free OpenVPN client supports<strong> two concurrent user connections<\/strong>. You must purchase the paid plan to enable more users to use the server.<\/p><p>To add and manage users, open the Admin dashboard and follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>User Management &rarr; User Permissions<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-OpenVPN-side-bar-with-User-Permissions-button-selected-1.png\"><img decoding=\"async\" width=\"458\" height=\"726\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-OpenVPN-side-bar-with-User-Permissions-button-selected-1.png\" alt=\"The OpenVPN side bar with User Permissions button selected\" class=\"wp-image-76088\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-OpenVPN-side-bar-with-User-Permissions-button-selected-1.png 458w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-OpenVPN-side-bar-with-User-Permissions-button-selected-1-189x300.png 189w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-OpenVPN-side-bar-with-User-Permissions-button-selected-1-95x150.png 95w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/a><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Enter the new <strong>username<\/strong> as shown below:<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.png\"><img decoding=\"async\" width=\"1024\" height=\"572\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard-1024x572.png\" alt=\"The User Permissions section on the OpenVPN dashboard\" class=\"wp-image-76091\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard-1024x572.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard-300x168.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard-150x84.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard-768x429.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.png 1406w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>For a new user, click <strong>More Settings <\/strong>to change other configurations like its password and permissions.<\/li>\n\n\n\n<li>Save the new settings and click <strong>Update Running Server<\/strong>.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-how-to-set-up-auto-login-profiles-for-a-linux-vpn-server-with-openvpn\">How to Set Up Auto-Login Profiles for a Linux VPN Server With OpenVPN<\/h3><p>OpenVPN lets you configure auto-login profiles, which will automatically route all non-local traffic via the VPN.<\/p><p>To set up auto-login, open the Admin dashboard<strong> <\/strong>and select <strong>User Permissions<\/strong>. Then, check the <strong>Allow Auto-login <\/strong>box on the profile you want to modify.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.-Allow-Auto-login-button-is-highlighted.png\"><img decoding=\"async\" width=\"1024\" height=\"535\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.-Allow-Auto-login-button-is-highlighted-1024x535.png\" alt=\"The User Permissions section on the OpenVPN dashboard\" class=\"wp-image-76089\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.-Allow-Auto-login-button-is-highlighted-1024x535.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.-Allow-Auto-login-button-is-highlighted-300x157.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.-Allow-Auto-login-button-is-highlighted-150x78.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.-Allow-Auto-login-button-is-highlighted-768x402.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/03\/The-User-Permissions-section-on-the-OpenVPN-dashboard.-Allow-Auto-login-button-is-highlighted.png 1534w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Alternatively, use <strong>User <\/strong>or <strong>Server<\/strong>-locked profiles to manually enable or disable the VPN.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-test-a-linux-vpn-server-running-openvpn\">How to Test a Linux VPN Server Running OpenVPN<\/h2><p>Connect to the VPN client and check your IP to see if the OpenVPN server works as expected. You can use online tools like <a href=\"https:\/\/nordvpn.com\/what-is-my-ip\/\" target=\"_blank\" rel=\"noreferrer noopener\">NordVPN&rsquo;s What is My IP<\/a> to check whether your IPv4 address changes.<\/p><p>Next, run a <a href=\"https:\/\/dnsleaktest.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">DNS leak test<\/a> to check your OpenVPN server&rsquo;s IPv4 address. On the website, choose the <strong>Extended test<\/strong>. The output should show the client devices&rsquo; DNS resolver IPs.<\/p><p>In addition, ensure the traffic uses the IPv4 protocol using <a href=\"https:\/\/test-ipv6.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Test your IPv6<\/a>. The tool should display the server IP and a message stating that no IPv6 address was detected.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Setting up a VPN server can be beneficial, especially if you want to encrypt internet traffic and browse safely. In this article, we have explained how to configure one in a Linux VPS using OpenVPN.<\/p><p>To do so, download and install the software package using your package manager commands, like APT for Debian or yum for CentOS. Alternatively, Hostinger users can set it up in one click using a VPS template via hPanel.<\/p><p>We&rsquo;ve also shown the OpenVPN server configuration procedure and client installations on various operating systems, including Windows, Linux, Android, iOS, and macOS.<\/p><p>We hope that you found this tutorial helpful. In case you have any questions, let us know in the comments section below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Virtual Private Network (VPN) secures users by creating a point-to-point connection that masks their internet traffic. Although paid VPN services are widely available, you may want to set up your own Linux VPN server with OpenVPN, a popular open-source option. This tutorial will show you how to set up a Linux VPN server using [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/uk\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":279,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Set Up and Manage a Linux VPN Server Using OpenVPN","rank_math_description":"Protect yourself with a Linux VPN server. Follow this guide to get one on Ubuntu and CentOS, and how to use it with other OS like Windows.","rank_math_focus_keyword":"linux vpn server","footnotes":""},"categories":[22641,22640],"tags":[],"class_list":["post-16212","post","type-post","status-publish","format-standard","hentry","category-vps-use-cases","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/configurer-un-serveur-vpn-linux-avec-openvpn","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/membuat-vpn-server","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn\/","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn\/","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/16212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/users\/279"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/comments?post=16212"}],"version-history":[{"count":39,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/16212\/revisions"}],"predecessor-version":[{"id":125839,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/16212\/revisions\/125839"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media?parent=16212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/categories?post=16212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/tags?post=16212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}