

Now, we’ll need to generate our keys and certificates. Step 4 - Generating Keys and Certificates Save and exit the OpenVPN server configuration file. push "dhcp-option DNS 8.8.8.8"Ĭhange user and group to nobody user nobody We’re going to use Google’s public DNS servers, 8.8.8.8 and8.8.4.4.įor this, uncomment the push “dhcp-option DNS lines and updating the IP addresses. Next we need to provide DNS servers to the client, as it will not be able to use the default DNS servers provided by your Internet service provider. Next, uncomment the push “redirect-gateway def1 bypass-dhcp” line, which tells the client to redirect all traffic through our OpenVPN. We will do the key generation in next step.

Because the default Diffie-Hellman encryption length for Easy RSA will be 2048 bytes. We need to change the dh file name to dh2048.pem. Most of the lines just need to be uncommented (remove the # and some of there are to be changed. Open the file in your favorite editor, I’m using editor, vi /etc/openvpn/nf

Cp /usr/share/doc/openvpn-*/sample/sample-config-files/nf /etc/openvpn
