Hy guy, I am having a problem with my OpenVPN connection. I hope the following information is all you need. I think the VPNConfig should be irrelevant because it works in one direction.
My Setup:
Network A (192.168.10.0/24)
* 192.168.10.110 Zentyal Server (OpenVPN Server is running here)
Network B (192.168.1.0/24)
* 192.168.1.10 RaspberryPI (OpenVPN Client is running here)
* 192.168.1.1 Router (routes correctly to 192.168.1.1 for 192.168.10.0/24)
* 192.168.1.x let's call this IP ClientB
These two networks are conneted side-to-side via a tunnel on 192.168.2.2
ifconfig
192.168.10.110 ZentyalServer
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.2.1 P-t-P:192.168.2.2 Mask:255.255.255.255
192.168.1.10 (RaspberryPI)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.2.10 P-t-P:192.168.2.9 Mask:255.255.255.255
Routing Table
192.168.10.110 ZentyalServer
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 192.168.2.2 255.255.255.0 UG 0 0 0 tun0
192.168.2.0 192.168.2.2 255.255.255.0 UG 0 0 0 tun0
192.168.2.2 * 255.255.255.255 UH 0 0 0 tun0
192.168.1.10 (RaspberryPI)
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
192.168.10.0 192.168.2.9 255.255.255.0 UG 0 0 0 tun0
192.168.2.0 192.168.2.9 255.255.255.0 UG 0 0 0 tun0
192.168.2.9 * 255.255.255.255 UH 0 0 0 tun0
iptables On both computers (192.168.10.110 and 192.168.1.1) I have set iptables with
sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
What works 192.168.1.x can ping 192.168.10.110 without any problems
What doesn't work 192.168.10.110 cannot ping any computer of Network B using a 192.168.1.0/24 address
ping 192.168.1.10
tcpdump at 192.168.10.110 on tun0:
08:42:37.588653 IP (tos 0x0, ttl 64, id 13218, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.2.1 > 192.168.1.10: ICMP echo request, id 392, seq 8, length 64
In my opinion this looks correct, doesn't it? But the tcp dump at 192.168.1.10 doesn't show any incoming packages.
Do you guys have an idea?
Thank you very much!!