I have 22 servers, where all servers have IP Private 192.168.0.0/24.
I installed OpenVPN on ubuntu server, I want to access all server via IP Private 192.168.0.0/24
from my local laptop.
On the OpenVPN server, eth0
has an IP Public 183.121.31.42
and eth1
has an IP private 192.168.0.5
.
I have run this command:
iptables -t nat -A POSTROUTING -o eth1 -s 10.8.0.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
But I still can't connect to all of my servers via IP Private.
iptables -t nat -A POSTROUTING -o <OpenVPN Interface> -j MASQUERADE