OpenVPN

1. Installing
yum install openvpn -y
sysctl net.ipv4.ip_forward=1
echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
systemctl -f enable [email protected]
2. Generating keys
cd /etc/openvpn/
openvpn --genkey --secret static.key
scp static.key server2:/etc/openvpn/
3. Configuring /etc/openvpn/server.conf on first node
proto tcp-server
dev tun
port 443
secret static.key
keepalive 30 120
persist-key
persist-tun
#tun-mtu 1500
#mssfix 1450
ifconfig 1.1.1.1 1.1.1.2
4. /etc/openvpn/client.conf on second node
remote 88.77.66.55 443
proto tcp-client
dev tun
secret static.key
keepalive 30 120
persist-key
persist-tun
#tun-mtu 1500
#mssfix 1450
ifconfig 1.1.1.2 1.1.1.1
start
systemctl start [email protected]