Initial setup of the client/server mode
In order to set up a basic OpenVPN server, we first create a server configuration file using the following steps:
Create the following file
proto udp port 1194 dev tun server 10.200.0.0 255.255.255.0 topology subnet persist-key persist-tun keepalive 10 60 dh /etc/openvpn/movpn/dh2048.pem ca /etc/openvpn/movpn/movpn-ca.crt cert /etc/openvpn/movpn/server.crt key /etc/openvpn/movpn/server.key user nobody group nobody # use ‘group nogroup’ on Debian/Ubuntu verb 3 daemon log-append /var/log/openvpn.log
Then, save it as
movpn-04-01-server.conf
. A detailed explanation of each of the configuration lines will be given later.Start the OpenVPN server:
[root@server] # openvpn --config movpn-04-01-server.conf
The command will not produce any output on the command line, as all output is redirected to the log file
/var/log/openvpn.log
. Check this file for OpenVPN’s startup message details:OpenVPN 2.3.2 x86_64-redhat-linux-gnu [SSL (OpenSSL...