Check current settings
sysctl -a
sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0
enable ip_forward setting to 1
sysctl -w net.ipv4.ip_forward=1
edit /etc/sysctl.conf to set permanently
vi /etc/sysctl.conf
add net.ipv4.ip_forward = 1
and then sysctl -p