I have OpenVPN set up on a Debian gateway server. Openvpn server gateway router lan is 172.16.20.0/24. The Gateway IP is 172.16.20.254. Below the openvpn.conf file:
server 172.16.21.0 255.255.255.0
keepalive 10 120
route 192.168.55.0 255.255.255.0
push "route 172.16.20.0 255.255.255.0"
push "route 172.16.200.0 255.255.255.0"
The client-side LAN network is 192.168.55.0/24 and gateway IP is 192.168.55.254. LAN vpn is 172.16.21.0/24. After you successfully connect vpn vpn server has the following IP 172.16.21.1 and 172.16.21.22 client. The client ping the server and all the LAN connected to him including the ADSL router with IP 172.16.200.254. The OpenVPN ping server successfully IP 172.16.21.22 but can not ping the IP address of the client LAN, ie 192.168.55.3 or the ADSL gateway of the LAN client, ie 192.168.55.254.
These are the server-side routes:
root@ccrr:/# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.16.200.254 0.0.0.0 UG 0 0 0 eth0
172.16.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.21.0 172.16.21.2 255.255.255.0 UG 0 0 0 tun0
172.16.21.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
172.16.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.55.0 172.16.21.2 255.255.255.0 UG 0 0 0 tun0
I plugged in the firewall configuration with the following rules:
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A OUTPUT -o tun+ -j ACCEPT
I followed the guide below to indicate to the server which route to follow to find the LAN client. Including multiple machines on the client side when using a routed VPN (dev tun).
I have the same problem when I try to install as a client another openvpn Debian gateway router. Everything works: the client connects to the server and can ping both the gateway server and openvpn both connected devices to its LAN, but not the reverse is true. That is, if the VPN gateway server, or the devices connected to its LAN, try to ping the client does not have any answers.
I tried to see what happens with tcpdump to ICMP packets when sending the ping command from the server to the client and this is the result:
18:12:01.335462 ip: 172.16.21.1 > 192.168.55.3: ICMP echo request, id 5855, seq 1, length 64
18:12:02.334983 ip: 172.16.21.1 > 192.168.55.3: ICMP echo request, id 5855, seq 2, length 64
Please help me understand why this happens and how I can solve this problem. Sorry for my bad english. Grazie.