Client HELP

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
Rockyuk
OpenVpn Newbie
Posts: 2
Joined: Wed Sep 15, 2010 1:06 am

Client HELP

Post by Rockyuk » Wed Sep 15, 2010 1:09 am

Hi everyone,
I am getting alittle confused about how to connect to my CentOS OpenVPN server through my client on a Windows 7 machine. I was advised it need to download various certificates on to my machine and copy them into the configuration folder on Windows 7 but i cannot find the folder for the life of me? Can someone explain to me where it is and is this the correct way to create a successful connection?

Thanks

Rockyuk

george
Forum Team
Posts: 117
Joined: Tue Jun 09, 2009 4:25 pm
Location: St. Louis, MO USA

Re: Client HELP

Post by george » Wed Sep 15, 2010 2:03 pm

First you need to make sure you have installed the client correctly on Windows 7, if I recall correctly, win7 installs the OpenVPN into C:\Program Files(x86)\OpenVPN

I have personally had great luck with openvpn-2.1_rc20 running on windows 7, and it includes openvpn-gui, which solves the issue of having to launch the client connection form a command line.

After you have everything installed correctly, (client and server), you will need to generate your client cert and key pairs, and copy the ca.crt, user.crt, and user.key files, (where user is your generated certificate file and key file name), over to the machine with the client. They all go into the OpenVPN\config\ directory.

Net create a client config file that has entries that coorespond to your server config. Here's a working win7 client config below:

Code: Select all


#Sets openvpn.exe to client mode
client

#Require that  peer  certificate  was  signed  with  an  explicit nsCertType "server".
ns-cert-type server

#Set openvpn to use a tun device instaed of a tap device, this must match server side settings
dev tun

#sets the protocol for openvpn to use, must match server side settings
;proto udp
proto tcp-client
#The remote server IP and port
remote xxx.xx.xx.xx 1194

#Allows remote connections from dynamic IPs:Commented out for testing
#float

#Try to resolve the openvpn server hostname infinitely
resolv-retry infinite

#Do not bind to a specific IP
nobind

#Do not re-read key files when obeying keep-alive directive
persist-key

#Do not close and re-open tun device when obeying keep-alive directive
persist-tun

#SSL Cert and key parameters
#THE CA PARAMETER NEED NOT BE CHANGED
ca ca.crt

#The following two lines need to match the username, (common name), of the end user they are issued to. This will be done via batch file issued to end user.
cert user.crt
key user.key



#For Windows Vista only. Overcomes vista routing table control command change from XP command set.
route-method exe 
route-delay 2

#Set compression type
comp-lzo

# Set log file verbosity.
verb 1

#Cause openvpn client to prompt for username/password
auth-user-pass
Know that there are other ther things that need to be setup correctly for the client to work properly in windows 7, (program permissions set to run as administrator, mainly), but this should get you headed in the right direction.

Rockyuk
OpenVpn Newbie
Posts: 2
Joined: Wed Sep 15, 2010 1:06 am

Re: Client HELP

Post by Rockyuk » Wed Sep 15, 2010 2:29 pm

Thankyou for your reply so do i need to create this config folder as there is none currently in my OpenVPN folder?

george
Forum Team
Posts: 117
Joined: Tue Jun 09, 2009 4:25 pm
Location: St. Louis, MO USA

Re: Client HELP

Post by george » Wed Sep 15, 2010 4:03 pm

Yes, and it needs to have an extension of .ovpn to be associated correctly.

Post Reply