I try to configure the following network structure in one dev VMWare environment.
W.XP------| |-----W10
192.168.5.100 | | 192.168.4.100
| |
| |
Endian FW -- VPN conn ----- OPENWRT as (Openvpn Server)
192.168.5.1 192.168.4.1
VPN IP 10.200.0.2 VPN IP 10.200.0.1
I configured one TUN connection and is UP and I can do ping from VPN both sides 10.200.0.2 <--> 10.200.0.1.
The vmware virtual Switch is in promiscuous mode.
Y try ping from
Endian --> OPENVPN works eth0 192.168.4.1
Endian --> W10 works
W.XP --> openvpn not works. "Wrong IPTABLES? "
OPENVPN --> ENDIAN not works... ping to eth0 192.168.5.1
W10 --> Endian not works
W10 --> W.XP no works
In Openwrt I added following routes:
route add -net 192.168.5.0/24 gw 10.200.0.2
And iptables conf:
iptables -A FORWARD -i eth0 -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -s 10.200.0.0/24 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.200.0.0/24 -o eth0 -j MASQUERADE
In Endian i added following routes:
route add -net 192.168.4.0/24 gw 10.200.0.1
and iptables conf: iptables -A FORWARD -i eth0 -o openvpntun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -s 10.200.0.0/24 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.200.0.0/24 -o eth0 -j MASQUERADE
I try to understand whats is wrong. But I can guess the problem is in IPTABLES filtering.