Page 1 of 1

[Resolved] Routing/Gateway Issue

Posted: Wed Nov 09, 2011 11:59 pm
by mc
Hi All,

Thanks for taking the time to help me :D

Im able to connect to the VPN server just fine but im not able to communicate with the private LAN from the client PC and vice versa

Im able to ping from
client PC > OpenVPN Server IP
Private LAN > OpenVPN Server IP
BUT NOT
client PC > Private LAN
Private LAN > Client PC

Here is the network info
Private LAN: 10.0.0.0/24
-> Ping Target: 10.0.0.253
OpenVPN LAN: 10.1.0.0/24
-> Server IP: 10.1.0.1
Client IP: 192.168.10.105/24

Thinking its a gateway issue i checked the ip info on the client PC and saw this
Default Gateway: (empty)

I changed the server.ovpn file to redirect all traffic through the VPN(in an attempt to get a propper gateway on the connection)
push "redirect-gateway def1 bypass-dhcp"
The gateway changed to 10.1.0.5(unpingable) This did not fix the issue

Here is the server file:
local 10.0.0.11
port 1194
proto tcp
dev tun
dev-node "tap-bridge"
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.key" # This file should be kept secret
dh "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\dh1024.pem"
server 10.1.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "route 10.0.0.0 255.255.255.0"
push "dhcp-option DNS 10.0.0.253"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 6

Here is the Client:
client
dev tun
dev-node tap-bridge
proto tcp
remote x.x.x.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\Christopher.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\Christopher.key"
ns-cert-type server
cipher BF-CBC
comp-lzo
verb 6

Re: Routing/Gateway Issue

Posted: Thu Nov 10, 2011 7:46 am
by maikcat
hi there,

did you enable ip forwarding on openvpn server?

did you configure routing on your pcs inside your lan correctly?

Michael.

Re: Routing/Gateway Issue

Posted: Thu Nov 10, 2011 4:26 pm
by mc
Ip Forwarding was the problem

Thanks so much for your time Michael



for anyone else that has this problem here is how to enable IP Forwarding

Change the value of this reg key to 1 (is normally 0) and reboot
(HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter)