On ESXI server i have several VMs: one with external ip address (and internet access), that is configured as NAT (and plays OpenVPN server role) and several VMs in VLAN (using 192.168.182.*/28 ip addresses).
I have set up OpenVPN server & client as described in debian docs to access those VLAN virtual machines.
Currently i have running (tun) OpenVPN server & client, i can ping each other via tun0 interface.
The problem is that i can't ping from OpenVPN client machines that are in ESXI VLAN. Could you please advise a way to fix that?
OpenVPN client routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 88.198.179.46 0.0.0.0 UG 0 0 0 eth0
10.9.8.1 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
88.198.179.40 0.0.0.0 255.255.255.248 U 0 0 0 eth0
OpenVPN server routing table:
default static.193.120. 0.0.0.0 UG 0 0 0 eth0
10.9.8.2 * 255.255.255.255 UH 0 0 0 tun0
46.4.120.192 * 255.255.255.224 U 0 0 0 eth0
192.168.182.16 * 255.255.255.240 U 0 0 0 eth1
As i understand, i have to route packets on OpenVPN server to 192.168.182.*/28 VLAN.
I have enabled ipv4 forwarding using following command:
echo "1" > /proc/sys/net/ipv4/ip_forward
I have added following rules to iptables (88.198.179.41/29 is client ip/subnet), but this did not help:
*nat
-A POSTROUTING -s 192.168.0.0/16 -o eth0 -j SNAT --to-source 46.4.120.218
COMMIT
*filter
-A FORWARD -s 192.168.182.0/24 -d 88.198.179.41/29 -j ACCEPT
-A FORWARD -d 192.168.182.0/24 -s 88.198.179.41/29 -j ACCEPT
COMMIT
Perhaps i have to define some route on VPNClient?