Basic OpenVPN setup not working

Posted by WalterJ89 on Server Fault See other posts from Server Fault or by WalterJ89
Published on 2010-05-20T01:21:16Z Indexed on 2010/05/20 21:10 UTC
Read the original article Hit count: 312

Filed under:
|
|
|
|

I am attempting to connect 2 win7 (x64+ x32) computers (there will be 4 in total) using OpenVPN. Right now they are on the same network but the intention is to be able to access the client remotely regardless of its location.

The Problem I am having is I am unable to ping or tracert between the two computers. They seem to be on different subnets even though I have the mask set to 255.255.255.0. The server ends up as 10.8.0.1 255.255.255.252 and the client 10.8.0.6 255.255.255.252. And a third ends up as 10.8.0.10. I don't know if this a Windows 7 problem or something I have wrong in my config. Its a very simple set up, I'm not connecting two LANs.

this is the server config (removed all the extra lines because it was too ugly)

port 1194
proto udp
dev tun
ca keys/ca.crt
cert keys/server.crt
key keys/server.key  # This file should be kept secret
dh keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
duplicate-cn
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 6

this is the client config

client
dev tun
proto udp
remote thisdomainis.random.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca keys/ca.crt
cert keys/client.crt
key keys/client.key
ns-cert-type server
comp-lzo
verb 6

Is there anything I missed in this? keys are all correct and the vpn's connect fine, its just the subnet or route issue.

Thank You

EDIT

it seems on the server the openvpn-status.log has the routes for the client

SERVER

OpenVPN CLIENT LIST
Updated,Wed May 19 18:26:32 2010
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
client,192.168.10.102:50517,19157,20208,Wed May 19 17:38:25 2010
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
10.8.0.6,client,192.168.10.102:50517,Wed May 19 17:38:56 2010
GLOBAL STATS
Max bcast/mcast queue length,0
END

Also this is from the client.log file: Which seems to be correct

C:\WINDOWS\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.5 

Another EDIT

'route print' on the server shows the route:

Destination Mask      Gateway   Interface   
10.8.0.0 255.255.255.0 10.8.0.2 10.8.0.1 

the same on the client shows

10.8.0.0 255.255.255.0 10.8.0.5 10.8.0.6  

So the routes are there.. what can the problem be?

Is there anything wrong with my configs?

Why would OpenVPN be having problems communicating?

© Server Fault or respective owner

Related posts about openvpn

Related posts about subnet