{"id":415,"date":"2016-08-13T05:21:42","date_gmt":"2016-08-13T02:21:42","guid":{"rendered":"https:\/\/community.virtono.com\/?p=415"},"modified":"2023-06-21T09:44:11","modified_gmt":"2023-06-21T06:44:11","slug":"how-to-build-openvpn-server-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/","title":{"rendered":"HOW TO BUILD OPENVPN SERVER ON UBUNTU"},"content":{"rendered":"<p>This article will show you how to install and setup OpenVPN server on Ubuntu 14.04, with pictures, just follow along, and if you encounter any trouble, just comment below.<\/p>\n<p>Before we dive in the steps, here is a little VPN and OpenVPN\u2019s basic definitions for you.<\/p>\n<p>What is VPN and OpenVPN? VPN stands for Virtual Private Network while OpenVPN is an open-source software application that applies VPN techniques for implementing secure point-to-point connections in routed or bridged configurations and remote access facilities. The VPN server is the underlying component in OpenVPN Access Server that works in the background, responsible for routing, tunneling, encryption, user management, authentication etc. OpenVPN Access Server comes with a Web GUI that helps to manage the underlying components of the VPN server. It is a free mechanism and tool to allow you to browse securely and privately plus it allows you to unblock browsing restriction, avoid website censorship, and to hide your real IP (location).<\/p>\n<p>Now on with the steps.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/#Requirements\" title=\"Requirements\">Requirements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/#HOW_TO_INSTALL_OPENVPS_SERVER\" title=\"HOW TO INSTALL OPENVPS SERVER\">HOW TO INSTALL OPENVPS SERVER<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/#CONFIGURING_OPENVPN_SERVER\" title=\"CONFIGURING OPENVPN SERVER\">CONFIGURING OPENVPN SERVER<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/#BUILD_THE_CERTIFICATE_AUTHORITY_FOR_OPENVPN\" title=\"BUILD THE CERTIFICATE AUTHORITY FOR OPENVPN\">BUILD THE CERTIFICATE AUTHORITY FOR OPENVPN<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/#USING_YOUR_OPENVPN_SERVER\" title=\"USING YOUR OPENVPN SERVER\">USING YOUR OPENVPN SERVER<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Requirements\"><\/span>Requirements<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li>A server \/ VPS running Ubuntu. In this guide I use Ubuntu 14.04 x64 with 1GB .<\/li>\n<li>You may also need a proper knowledge to useSSH and basic Unix commands.<\/li>\n<li>And if somehow you are using an OpenVZ-based VPS, you have enable<strong>TUN\/TAP<\/strong>\u00a0options in your VPS control panel. Xen and KVM users do not need to. And if you need more info on OpenVZ vs KVM, read <a href=\"https:\/\/virtono.com\/community\/knowledgebase\/what-is-the-difference-between-kvm-and-openvz-virtualization\/\" target=\"_blank\" rel=\"noopener\">this article<\/a>.<\/li>\n<\/ol>\n<p>Enable TUN\/TAP:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"416\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/0\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/0.png?fit=595%2C168&amp;ssl=1\" data-orig-size=\"595,168\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"0\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/0.png?fit=595%2C168&amp;ssl=1\" class=\"alignnone wp-image-416\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/0-300x85.png?resize=332%2C94&#038;ssl=1\" alt=\"0\" width=\"332\" height=\"94\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/0.png?resize=300%2C85&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/0.png?w=595&amp;ssl=1 595w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"HOW_TO_INSTALL_OPENVPS_SERVER\"><\/span>HOW TO INSTALL OPENVPS SERVER<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Step 1<\/strong>\u00a0\u2013 Login to your server as root:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"417\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/1-16\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-5.png?fit=547%2C136&amp;ssl=1\" data-orig-size=\"547,136\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-5.png?fit=547%2C136&amp;ssl=1\" class=\"alignnone wp-image-417\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/1-5-300x75.png?resize=344%2C86&#038;ssl=1\" alt=\"1\" width=\"344\" height=\"86\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-5.png?resize=300%2C75&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-5.png?w=547&amp;ssl=1 547w\" sizes=\"auto, (max-width: 344px) 100vw, 344px\" \/><\/p>\n<p><strong>Step 2<\/strong>\u00a0\u2013 To make sure your Ubuntu\u2019s repository is updated, simply do the apt-get update command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">apt-get update<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"418\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/2-15\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-5.png?fit=620%2C356&amp;ssl=1\" data-orig-size=\"620,356\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-5.png?fit=620%2C356&amp;ssl=1\" class=\"alignnone wp-image-418\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/2-5-300x172.png?resize=527%2C302&#038;ssl=1\" alt=\"2\" width=\"527\" height=\"302\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-5.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-5.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/p>\n<p><strong>Step 3<\/strong>\u00a0\u2013 And once you get the \u201cDone\u201d message, you can now install OpenVPN and Easy-RSA with this one line command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">apt-get install openvpn easy-rsa<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Do not forget to answer with\u00a0<strong>Y<\/strong>\u00a0when asked:<\/p>\n<p>Once done, you\u2019ll see something like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"419\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/3-14\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-5.png?fit=452%2C124&amp;ssl=1\" data-orig-size=\"452,124\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-5.png?fit=452%2C124&amp;ssl=1\" class=\"alignnone wp-image-419\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/3-5-300x82.png?resize=483%2C132&#038;ssl=1\" alt=\"3\" width=\"483\" height=\"132\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-5.png?resize=300%2C82&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-5.png?w=452&amp;ssl=1 452w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/p>\n<p><strong>Step 4<\/strong>\u00a0\u2013 Now you have to get the configuration file for OpenVPN to work. Issue this command:<\/p>\n<table width=\"853\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"821\">gunzip -c \/usr\/share\/doc\/openvpn\/examples\/sample-config-files\/server.conf.gz &gt; \/etc\/openvpn\/server.conf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This will give no output when its done.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"420\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/4-12\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-4.png?fit=620%2C69&amp;ssl=1\" data-orig-size=\"620,69\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-4.png?fit=620%2C69&amp;ssl=1\" class=\"alignnone wp-image-420\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/4-4-300x33.png?resize=509%2C56&#038;ssl=1\" alt=\"4\" width=\"509\" height=\"56\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-4.png?resize=300%2C33&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-4.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/p>\n<p><strong>Step 5<\/strong>\u00a0\u2013 Then open that file using your favorite text editor which I prefer to use Nano, just type the command then hit Enter and the text editor will show up :<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">nano \/etc\/openvpn\/server.conf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span class=\"ez-toc-section\" id=\"CONFIGURING_OPENVPN_SERVER\"><\/span>CONFIGURING OPENVPN SERVER<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Step 6<\/strong>\u00a0\u2013 Next, there are several lines in that file you need to edit (configuring OpenVPN):<\/p>\n<p><strong>6.1<\/strong>\u00a0\u2013 Look for the section called Diffie hellman parameters:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"421\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/5-10\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-4.png?fit=392%2C117&amp;ssl=1\" data-orig-size=\"392,117\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-4.png?fit=392%2C117&amp;ssl=1\" class=\"alignnone wp-image-421\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/5-4-300x90.png?resize=397%2C119&#038;ssl=1\" alt=\"5\" width=\"397\" height=\"119\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-4.png?resize=300%2C90&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-4.png?w=392&amp;ssl=1 392w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/p>\n<p>then change\u00a0<strong>dh dh1024.pem<\/strong>\u00a0to\u00a0<strong>dh dh2048.pem<\/strong>\u00a0to increase the security encryption.<\/p>\n<p><strong>6.2<\/strong>\u00a0\u2013 Next, find this section as well:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"422\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/6-10\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-4.png?fit=475%2C164&amp;ssl=1\" data-orig-size=\"475,164\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-4.png?fit=475%2C164&amp;ssl=1\" class=\"alignnone wp-image-422\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/6-4-300x104.png?resize=433%2C150&#038;ssl=1\" alt=\"6\" width=\"433\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-4.png?resize=300%2C104&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-4.png?w=475&amp;ssl=1 475w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/p>\n<p>This section tells VPN server to pass on clients\u2019 web traffic to its destination. Simply uncomment that part so it looks like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"423\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/7-9\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-4.png?fit=447%2C165&amp;ssl=1\" data-orig-size=\"447,165\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-4.png?fit=447%2C165&amp;ssl=1\" class=\"alignnone wp-image-423\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/7-4-300x111.png?resize=457%2C169&#038;ssl=1\" alt=\"7\" width=\"457\" height=\"169\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-4.png?resize=300%2C111&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-4.png?w=447&amp;ssl=1 447w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><\/p>\n<p><strong>6.3<\/strong>\u00a0\u2013 Now let\u2019s move to the next section just right after the previous one, just move down a bit.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"424\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/8-9\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/8-4.png?fit=444%2C149&amp;ssl=1\" data-orig-size=\"444,149\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"8\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/8-4.png?fit=444%2C149&amp;ssl=1\" class=\"alignnone wp-image-424\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/8-4-300x101.png?resize=481%2C162&#038;ssl=1\" alt=\"8\" width=\"481\" height=\"162\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/8-4.png?resize=300%2C101&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/8-4.png?w=444&amp;ssl=1 444w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><\/p>\n<p>again, uncomment the two lines of configuration so it looks like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"425\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/9-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-3.png?fit=423%2C146&amp;ssl=1\" data-orig-size=\"423,146\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-3.png?fit=423%2C146&amp;ssl=1\" class=\"alignnone wp-image-425\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/9-3-300x104.png?resize=479%2C166&#038;ssl=1\" alt=\"9\" width=\"479\" height=\"166\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-3.png?resize=300%2C104&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-3.png?w=423&amp;ssl=1 423w\" sizes=\"auto, (max-width: 479px) 100vw, 479px\" \/><\/p>\n<p>That section tells OpenVPN to configure DNS Resolver using OpenDNS, you can change that to Google DNS as well (8.8.8.8 and 8.8.4.4).<\/p>\n<p><strong>6.4<\/strong>\u00a0\u2013 The last one, look for this section:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"426\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/10-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-3.png?fit=446%2C134&amp;ssl=1\" data-orig-size=\"446,134\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-3.png?fit=446%2C134&amp;ssl=1\" class=\"alignnone wp-image-426\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/10-3-300x90.png?resize=490%2C147&#038;ssl=1\" alt=\"10\" width=\"490\" height=\"147\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-3.png?resize=300%2C90&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-3.png?w=446&amp;ssl=1 446w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/p>\n<p>Uncomment that section:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"427\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/11-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-3.png?fit=406%2C134&amp;ssl=1\" data-orig-size=\"406,134\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"11\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-3.png?fit=406%2C134&amp;ssl=1\" class=\"alignnone wp-image-427\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/11-3-300x99.png?resize=503%2C166&#038;ssl=1\" alt=\"11\" width=\"503\" height=\"166\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-3.png?resize=300%2C99&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-3.png?w=406&amp;ssl=1 406w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/p>\n<p>That\u2019s it. Now save changes and exit. If you are using Nano editor like me, simply hit Control+O then Control+X.<\/p>\n<p><strong>Step 7<\/strong>\u00a0\u2013 You will also need to enable IP forwarding in the file \/etc\/sysctl.conf need to tell the server\u2019s kernel to forward traffic from client devices out to the Internet. Issue this command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>it will output nothing<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"428\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/12-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-3.png?fit=494%2C56&amp;ssl=1\" data-orig-size=\"494,56\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"12\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-3.png?fit=494%2C56&amp;ssl=1\" class=\"alignnone wp-image-428\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/12-3-300x34.png?resize=538%2C61&#038;ssl=1\" alt=\"12\" width=\"538\" height=\"61\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-3.png?resize=300%2C34&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-3.png?w=494&amp;ssl=1 494w\" sizes=\"auto, (max-width: 538px) 100vw, 538px\" \/><\/p>\n<p>next you can edit the\u00a0<strong>sysctl.conf<\/strong>\u00a0file using Nano or your favorite editor.<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">nano \/etc\/sysctl.conf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Now Uncomment the line to enable packet forwarding for IPv4:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"429\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/13-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/13-1.png?fit=514%2C196&amp;ssl=1\" data-orig-size=\"514,196\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"13\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/13-1.png?fit=514%2C196&amp;ssl=1\" class=\"alignnone wp-image-429\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/13-1-300x114.png?resize=503%2C191&#038;ssl=1\" alt=\"13\" width=\"503\" height=\"191\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/13-1.png?resize=300%2C114&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/13-1.png?w=514&amp;ssl=1 514w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/p>\n<p>make it like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"430\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/14-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/14-1.png?fit=491%2C108&amp;ssl=1\" data-orig-size=\"491,108\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"14\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/14-1.png?fit=491%2C108&amp;ssl=1\" class=\"alignnone wp-image-430\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/14-1-300x66.png?resize=527%2C116&#038;ssl=1\" alt=\"14\" width=\"527\" height=\"116\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/14-1.png?resize=300%2C66&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/14-1.png?w=491&amp;ssl=1 491w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/p>\n<p>Now save changes and exit (Control+O then Control+X in Nano)<\/p>\n<p><strong>Step 8<\/strong>\u00a0\u2013 Next, issue this two lines of command to tell UFW to allow UDP traffic over port\u00a01194:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>\n<p>1<\/p>\n<p>2<\/td>\n<td width=\"573\">\n<p>allow ssh<\/p>\n<p>allow UDP traffic over port 1194<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"431\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/15-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/15.png?fit=536%2C141&amp;ssl=1\" data-orig-size=\"536,141\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"15\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/15.png?fit=536%2C141&amp;ssl=1\" class=\"alignnone wp-image-431\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/15-300x79.png?resize=543%2C143&#038;ssl=1\" alt=\"15\" width=\"543\" height=\"143\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/15.png?resize=300%2C79&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/15.png?w=536&amp;ssl=1 536w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><\/p>\n<p>* UFW = Uncomplicated Firewall, a firewall app comes by default in Ubuntu 14.04<\/p>\n<p><strong>Step 9<\/strong>\u00a0\u2013 Change UFW\u2019s primary configuration file by setting its forwarding policy using Nano:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">nano \/etc\/default\/ufw<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In that file, look for this line: DEFAULT_FORWARD_POLICY=\u201dDROP\u201d<\/p>\n<p>and replace DROP with ACCEPT<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"432\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/16-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/16.png?fit=392%2C123&amp;ssl=1\" data-orig-size=\"392,123\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"16\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/16.png?fit=392%2C123&amp;ssl=1\" class=\"alignnone wp-image-432\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/16-300x94.png?resize=444%2C139&#038;ssl=1\" alt=\"16\" width=\"444\" height=\"139\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/16.png?resize=300%2C94&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/16.png?w=392&amp;ssl=1 392w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/p>\n<p><strong>Step 10<\/strong>\u00a0\u2013 Also, you have to add additional UFW rules for network address translation and IP masquerading of connected clients. Issue command below:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">nano \/etc\/ufw\/before.rules<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Then add additional section right after\u00a0<strong>rules.before<\/strong>\u00a0(near the top). Copy paste this setting:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/td>\n<td width=\"573\">\n<p># START OPENVPN RULES<\/p>\n<p># NAT table rules<\/p>\n<p>*nat<\/p>\n<p>:POSTROUTING ACCEPT [0:0]<\/p>\n<p># Allow traffic from OpenVPN client to eth0<\/p>\n<p>-A POSTROUTING -s 10.8.0.0\/8 -o eth0 -j MASQUERADE<\/p>\n<p>COMMIT<\/p>\n<p># END OPENVPN RULES<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>so it looks like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"433\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/17\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/17.png?fit=618%2C469&amp;ssl=1\" data-orig-size=\"618,469\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"17\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/17.png?fit=618%2C469&amp;ssl=1\" class=\"alignnone wp-image-433\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/17-300x228.png?resize=595%2C452&#038;ssl=1\" alt=\"17\" width=\"595\" height=\"452\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/17.png?resize=300%2C228&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/17.png?w=618&amp;ssl=1 618w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/p>\n<p>Save changes and close the editor (Control+O then Control+X in Nano). Done? Simply enable UFW:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">ufw enable<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>answer Y when asked.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"434\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/18\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/18.png?fit=620%2C97&amp;ssl=1\" data-orig-size=\"620,97\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"18\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/18.png?fit=620%2C97&amp;ssl=1\" class=\"alignnone wp-image-434\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/18-300x47.png?resize=530%2C83&#038;ssl=1\" alt=\"18\" width=\"530\" height=\"83\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/18.png?resize=300%2C47&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/18.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"BUILD_THE_CERTIFICATE_AUTHORITY_FOR_OPENVPN\"><\/span>BUILD THE CERTIFICATE AUTHORITY FOR OPENVPN<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Step 11<\/strong>\u00a0\u2013 You have to copy over the Easy-RSA generation scripts to OpenVPN directory and create a directory called easy-rsa\/keys:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>\n<p>1<\/p>\n<p>2<\/td>\n<td width=\"573\">\n<p>cp -r \/usr\/share\/easy-rsa\/ \/etc\/openvpn<\/p>\n<p>mkdir \/etc\/openvpn\/easy-rsa\/keys<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"435\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/19\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/19.png?fit=501%2C60&amp;ssl=1\" data-orig-size=\"501,60\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"19\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/19.png?fit=501%2C60&amp;ssl=1\" class=\"alignnone wp-image-435\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/19-300x36.png?resize=550%2C66&#038;ssl=1\" alt=\"19\" width=\"550\" height=\"66\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/19.png?resize=300%2C36&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/19.png?w=501&amp;ssl=1 501w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<p><strong>Step 12<\/strong>\u00a0\u2013 Now you have to edit few variables using your favorite editor:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">nano \/etc\/openvpn\/easy-rsa\/vars<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Scroll down the page a bit and look for default values for fields which will be placed in the certificate, change that according your preferences:<\/p>\n<p><strong>Step 19<\/strong>\u00a0\u2013 Also look for this line:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">export KEY_NAME=&#8221;EasyRSA&#8221;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>and change that \u201cEasyRSA\u201d part with \u201cserver\u201d for simplicity.<\/p>\n<p>Now save changes and exit the editor.<\/p>\n<p><strong>Step 20<\/strong>\u00a0\u2013 Next, generate the Diffie-Hellman parameters using this command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">openssl dhparam -out \/etc\/openvpn\/dh2048.pem 2048<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>just wait as it may take few minutes to complete:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"436\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/22\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/22.png?fit=575%2C122&amp;ssl=1\" data-orig-size=\"575,122\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"22\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/22.png?fit=575%2C122&amp;ssl=1\" class=\"alignnone wp-image-436\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/22-300x64.png?resize=427%2C91&#038;ssl=1\" alt=\"22\" width=\"427\" height=\"91\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/22.png?resize=300%2C64&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/22.png?w=575&amp;ssl=1 575w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><\/p>\n<p><strong>Step 21<\/strong>\u00a0\u2013 Now move to easy-rsa directory and initialize the PKI (Public Key Infrastructure). Issue these ones:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/td>\n<td width=\"573\">\n<p>cd \/etc\/openvpn\/easy-rsa<\/p>\n<p>. .\/vars<\/p>\n<p>.\/clean-all<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The last clean-all command is to clear the working directory of any possible old or example keys hence you can create our new one.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"437\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/23\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/23.png?fit=620%2C72&amp;ssl=1\" data-orig-size=\"620,72\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"23\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/23.png?fit=620%2C72&amp;ssl=1\" class=\"alignnone wp-image-437\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/23-300x35.png?resize=514%2C60&#038;ssl=1\" alt=\"23\" width=\"514\" height=\"60\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/23.png?resize=300%2C35&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/23.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/p>\n<p><strong>Step 22<\/strong>\u00a0\u2013 Let\u2019s build the Certificate Authority (CA) using this simple one line command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">.\/build-ca<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You\u2019ll be asked a series of question but simply hit Enter for each. Don\u2019t worry it is already set to your entries earlier:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"438\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/24\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/24.png?fit=611%2C347&amp;ssl=1\" data-orig-size=\"611,347\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"24\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/24.png?fit=611%2C347&amp;ssl=1\" class=\"alignnone wp-image-438\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/24-300x170.png?resize=399%2C226&#038;ssl=1\" alt=\"24\" width=\"399\" height=\"226\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/24.png?resize=300%2C170&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/24.png?w=611&amp;ssl=1 611w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/p>\n<p><strong>Step 23<\/strong>\u00a0\u2013 Next, build the server\u2019s key with this command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">.\/build-key-server server<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You can replace server with whatever you\u2019ve defined in step 19 above. E.g: if the export KEY_NAME is servermom then it looks like this<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">.\/build-key-server servermom<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You\u2019ll be again asked with series of question, simply hit Enter until you see a message saying<strong>Database Updated<\/strong>.<\/p>\n<p><strong>Step 24<\/strong>\u00a0\u2013 Now the Server Certificates and Keys are created, you then have to move them in the OpenVPN directory:<\/p>\n<table width=\"622\">\n<tbody>\n<tr>\n<td>\n<p>1<\/p>\n<p>2<\/td>\n<td width=\"590\">\n<p>cp \/etc\/openvpn\/easy-rsa\/keys\/{server.crt,server.key,ca.crt} \/etc\/openvpn<\/p>\n<p>ls \/etc\/openvpn<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>you should now see the three files have been moved<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"439\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/25\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/25.png?fit=620%2C41&amp;ssl=1\" data-orig-size=\"620,41\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"25\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/25.png?fit=620%2C41&amp;ssl=1\" class=\"alignnone wp-image-439\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/25-300x20.png?resize=465%2C31&#038;ssl=1\" alt=\"25\" width=\"465\" height=\"31\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/25.png?resize=300%2C20&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/25.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/p>\n<p><strong>Step 25<\/strong>\u00a0\u2013 That\u2019s it. Now you can start OpenVPN using this simple command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">service openvpn start<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Then next time you can make sure it is running by issuing this command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">service openvpn status<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"440\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/26\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/26.png?fit=523%2C97&amp;ssl=1\" data-orig-size=\"523,97\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"26\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/26.png?fit=523%2C97&amp;ssl=1\" class=\"alignnone wp-image-440\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/26-300x56.png?resize=396%2C74&#038;ssl=1\" alt=\"26\" width=\"396\" height=\"74\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/26.png?resize=300%2C56&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/26.png?w=523&amp;ssl=1 523w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"USING_YOUR_OPENVPN_SERVER\"><\/span>USING YOUR OPENVPN SERVER<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Step 26<\/strong>\u00a0\u2013 Before you can use your newly built OpenVPN server, you have to firstly create certificates and keys for each client device which will be connecting to the VPN. Still in the\/etc\/openvpn\/easy-rsa\u00a0directory, build authentication credentials for a client which in this example we call it\u00a0<strong>client1<\/strong>. Issue this command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">.\/build-key client1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You can simply press Enter for each question or you may also change its default value but make sure the two last questions are left blank (hit Enter). But do not forget to answer\u00a0<strong>Y<\/strong>\u00a0for the very last questions.<\/p>\n<p><strong>Step 27<\/strong>\u00a0\u2013 Now copy the example client configuration file to the Easy-RSA key directory and rename it as client.conf.<\/p>\n<table width=\"869\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"837\">cp \/usr\/share\/doc\/openvpn\/examples\/sample-config-files\/client.conf \/etc\/openvpn\/easy-rsa\/keys\/client.ovpn<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Step 28<\/strong>\u00a0\u2013 Now download the client1.crt, client1.key, client.ovpn and ca.crt files to your device (PC, Smartphone or Tablet). Remember that ca.crt file is stored in\u00a0<strong>\/etc\/openvpn\/<\/strong>\u00a0directory at your server while the other three are in\u00a0<strong>\/etc\/openvpn\/easy-rsa\/keys\/<\/strong>.<\/p>\n<p>How can you download those files using Filezilla or WinSCP.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"442\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/28\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/28.png?fit=620%2C397&amp;ssl=1\" data-orig-size=\"620,397\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"28\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/28.png?fit=620%2C397&amp;ssl=1\" class=\"alignnone wp-image-442\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/28-300x192.png?resize=377%2C241&#038;ssl=1\" alt=\"28\" width=\"377\" height=\"241\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/28.png?resize=300%2C192&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/28.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 377px) 100vw, 377px\" \/><\/p>\n<p><strong>Step 29<\/strong>\u00a0\u2013 Once downloaded, open up client.ovpn file using simple text editor like Notepad (In Windows, right-click then Open With..). Look for this line:\u00a0<strong>remote my-server-1 1194<\/strong>. Replace my-server-1 with your server\/vps IP address:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"443\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/29\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/29.png?fit=444%2C195&amp;ssl=1\" data-orig-size=\"444,195\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"29\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/29.png?fit=444%2C195&amp;ssl=1\" class=\"alignnone wp-image-443\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/29-300x132.png?resize=391%2C172&#038;ssl=1\" alt=\"29\" width=\"391\" height=\"172\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/29.png?resize=300%2C132&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/29.png?w=444&amp;ssl=1 444w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/p>\n<p>In this example I use Sublime instead Notepad.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"444\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/30-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/30.png?fit=383%2C130&amp;ssl=1\" data-orig-size=\"383,130\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"30\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/30.png?fit=383%2C130&amp;ssl=1\" class=\"alignnone wp-image-444\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/30-300x102.png?resize=429%2C146&#038;ssl=1\" alt=\"30\" width=\"429\" height=\"146\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/30.png?resize=300%2C102&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/30.png?w=383&amp;ssl=1 383w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/p>\n<p>Next, this is optional but may needed if you want to use it on your non-Windows device (iOS or Android or Linux), uncomment the user and group section:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"445\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-build-openvpn-server-on-ubuntu\/attachment\/31-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/31.png?fit=449%2C65&amp;ssl=1\" data-orig-size=\"449,65\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"31\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/31.png?fit=449%2C65&amp;ssl=1\" class=\"alignnone wp-image-445\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/31-300x43.png?resize=453%2C65&#038;ssl=1\" alt=\"31\" width=\"453\" height=\"65\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/31.png?resize=300%2C43&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/31.png?w=449&amp;ssl=1 449w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/p>\n<p>That\u2019s it. Save changes and exit Sublime.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article will show you how to install and setup OpenVPN server on Ubuntu 14.04, with pictures, just follow along, and if you encounter any trouble, just comment below. Before we dive in the steps, here is a little VPN and OpenVPN\u2019s basic definitions for you. What is VPN and<\/p>\n","protected":false},"author":3,"featured_media":446,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[],"class_list":["post-415","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/picc.png?fit=400%2C300&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-6H","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":450,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-setup-config-openvpn-on-centos-6-4\/","url_meta":{"origin":415,"position":0},"title":"How to Install, Setup, Config OpenVPN on CentOS 6.4 .","author":"Daniel Draga","date":"August 13, 2016","format":false,"excerpt":"A brief introduction to CentOS, or if you are a restless soul, just go straight to the process. CentOS stands for Community ENTerprise Operating System. CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.\u00a0 CentOS conforms fully\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/vpn.jpg?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/vpn.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/vpn.jpg?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/vpn.jpg?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/vpn.jpg?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3182,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-virtualmin-on-ubuntu-22-04\/","url_meta":{"origin":415,"position":1},"title":"How to install Virtualmin on Ubuntu 22.04","author":"George B.","date":"April 7, 2023","format":false,"excerpt":"In this tutorial, we'll walk you through the steps to install Virtualmin on Ubuntu 22.04. What is Virtualmin? Virtualmin is a popular web hosting control panel that allows you to manage multiple domains, email accounts, and websites on a single server. It's designed to be easy to use, even for\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-Virtualmin-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-Virtualmin-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-Virtualmin-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":724,"url":"https:\/\/www.virtono.com\/community\/news-announcements\/how-to-protect-your-server-against-the-dirty-cow-linux-vulnerability\/","url_meta":{"origin":415,"position":2},"title":"How To Protect Your Server Against the Dirty COW Linux Vulnerability","author":"Virtono","date":"October 25, 2016","format":false,"excerpt":"Introduction : On October 19, 2016, a privilege escalation vulnerability in the Linux kernel was disclosed. The bug is nicknamed Dirty COW because the underlying issue was a race condition in the way kernel handles copy-on-write (COW). Dirty COW has existed for a long time at least since 2007, with\u2026","rel":"","context":"In &quot;Announcements&quot;","block_context":{"text":"Announcements","link":"https:\/\/www.virtono.com\/community\/category\/news-announcements\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/IMG_2035.jpg?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/IMG_2035.jpg?fit=1200%2C900&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/IMG_2035.jpg?fit=1200%2C900&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/IMG_2035.jpg?fit=1200%2C900&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/IMG_2035.jpg?fit=1200%2C900&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3507,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lemp-stack-linux-nginx-mysql-and-php-on-ubuntu-22-04\/","url_meta":{"origin":415,"position":3},"title":"How to install LEMP stack (Linux, Nginx, MySQL, and PHP) on Ubuntu 22.04","author":"George B.","date":"June 20, 2023","format":false,"excerpt":"Introduction The LEMP stack is a popular software stack for web development and hosting. It includes four major components: Linux, Nginx, MySQL, and PHP. Each component serves a specific purpose in powering dynamic websites and web applications. Linux is the operating system that serves as the LEMP stack's foundation. In\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3330,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/","url_meta":{"origin":415,"position":4},"title":"How to Set Up SSH Keys on Ubuntu 20.04","author":"George B.","date":"April 27, 2023","format":false,"excerpt":"In this tutorial, we will learn how to set up SSH keys on Ubuntu 20.04. Secure Shell (SSH) is a protocol used to securely connect to a remote server or computer. It provides a secure way to transfer files, execute remote commands, and manage remote systems. SSH keys are a\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Set-Up-SSH-Keys-on-Ubuntu-20.04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Set-Up-SSH-Keys-on-Ubuntu-20.04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Set-Up-SSH-Keys-on-Ubuntu-20.04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3492,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-and-configure-mail-server-on-ubuntu\/","url_meta":{"origin":415,"position":5},"title":"How to Install and Configure Mail Server on Ubuntu","author":"George B.","date":"June 11, 2023","format":false,"excerpt":"Setting up a mail server on Ubuntu can be a daunting task for many, but with the right guidance and understanding, it becomes an achievable goal. In this article, we will provide a step-by-step guide on how to install and configure a mail server on Ubuntu. By the end, you'll\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-and-Configure-Mail-Server-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-and-Configure-Mail-Server-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-and-Configure-Mail-Server-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":3,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"predecessor-version":[{"id":3550,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/415\/revisions\/3550"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/446"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}