leonidostrovski
Hi all!
I have OpenVPN Server + Windows client + Router client.
I need access devices on the LAN behind the router client.
Ping between OpenVPN clients works fine!!! (10.7.1.1 / 10.7.1.4 / 10.7.1.8)
The ping from OpenVPN server to router LAN IP (192.168.20.253) or PC1 (192.168.20.56), does not work!
I need access from the server to LAN 192.168.20.0
I need access from the client1 to LAN 192.168.20.0
Thanks for help!
==================================================================================================================
OpenVPN Server (VPS Windows Server) - connected to Internet
(VPN IP:10.7.1.1) Real IP:"IPDC11"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter"=dword:00000001
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Server config file:
route-delay 60 60
ip-win32 ipapi
tls-server
tun-mtu 1400
port 1194
proto tcp
dev tap
server 10.7.1.0 255.255.255.0
client-to-client
comp-lzo
persist-key
persist-tun
keepalive 10 120
==================================================================================================================
OpenVPN client1 (VPS Windows Server) - connected to Internet
(VPN IP:10.7.1.4) Real IP:"IPDC34"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
client1 config file:
route-delay 60 60
ip-win32 ipapi
ping-restart 70
ping 10
client
dev tap
proto tcp
remote "IPDC11" 1194
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
route-method exe
route-delay 30
tun-mtu 1400
==================================================================================================================
OpenVPN client2 (DD-WRT WZR-1750DHPD router) - connected to Internet via PPPoE
(VPN IP:10.7.1.8) WAN IP:"DYNAMICIP" LAN IP:192.168.20.253 LAN MASK:255.255.255.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
client2 Firewall Script:
iptables -I INPUT -i tap+ -j ACCEPT
iptables -I FORWARD -i tap+ -j ACCEPT
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
cat /proc/sys/net/ipv4/ip_forward =1
==================================================================================================================
PC1 (Windows 8) - connected to router LAN 192.168.20.0/24
IP:192.168.20.56
leonidostrovski
The solution is:
On server config, and clients config files "dev tap" changed to "dev tun"
In the router firewall script "tap+" replaced by "tun+"
To the server config file added:
push "route 192.168.20.0 255.255.255.0"
route 192.168.20.0 255.255.255.0
route "IPDC34" 255.255.255.240
client-config-dir ccd
On the server, created directory "ccd" ("c:\Program Files\OpenVPN\config\ccd")
In ccd directory cretaed files:
client01 with text iroute 192.168.20.0 255.255.255.0
client02 with text iroute "IPDC34" 255.255.255.240