OpenVPN requires IPv4 forwarding to allow routing between servers

February 19, 2016

OpenVPN requires IPv4 forwarding to allow routing between servers

The problem: no connectivity between two computers that are both connecting into an openVPN server.  the open VPN server is able to connect to both of the computers

Open VPN Setup

Two different computers connecting to the open VPN server on the same C class IP.

 Solution

The short term solution is to run a command that enables IPv4 forwarding

#sysctl -w net.ipv4.ip_forward=1

However this will not survive a reboot.  so open the sysctl configuration file and set it.

>vi /etc/sysctl.conf  #uncomment the net.ipv4.ip_forward line

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

That’s it,  the 2 computers should be able to communicate