mirror of https://github.com/OpenVPN/openvpn-gui
parent
668afa8640
commit
1ab2254464
178
README.rst
178
README.rst
|
@ -1,65 +1,69 @@
|
||||||
Installation Instructions for OpenVPN GUI for Windows
|
Installation Instructions for OpenVPN GUI for Windows
|
||||||
#####################################################
|
#####################################################
|
||||||
|
|
||||||
You can either get my installation package for OpenVPN 2.0.X where I've
|
OpenVPN-GUI has been bundled with OpenVPN installers for a long time, so there
|
||||||
bundled the gui in the installation package, or you can use the original
|
is rarely a need to install it separately. Bleeding-edge
|
||||||
installation package from OpenVPN, and then manually install OpenVPN GUI.
|
versions of OpenVPN-GUI are available in `OpenVPN snapshot
|
||||||
|
installers <http://build.openvpn.net/downloads/snapshots/>`_ based on Git master
|
||||||
|
branch. OpenVPN-GUI gets installed by default in all OpenVPN installers.
|
||||||
|
|
||||||
|
Installation using the official OpenVPN installers
|
||||||
|
**************************************************
|
||||||
|
|
||||||
Installation using the bundled OpenVPN package with OpenVPN GUI included
|
* Download an `OpenVPN installer <https://openvpn.net/index.php/open-source.html>`_
|
||||||
************************************************************************
|
* If you have a previous version of OpenVPN GUI running, shut it down.
|
||||||
|
|
||||||
* Download openvpn-2.0.X-gui-1.0.X-install.exe from
|
|
||||||
http://openvpn.se
|
|
||||||
|
|
||||||
* If you have a previous version of OpenVPN GUI installed, shut it down.
|
|
||||||
Make sure it's closed by ALL logged on users.
|
Make sure it's closed by ALL logged on users.
|
||||||
|
|
||||||
* Run the install program. During the installation you can choose if the GUI
|
* Run the OpenVPN installer
|
||||||
should be started automatically at system startup. The default is yes.
|
|
||||||
|
|
||||||
* Create a xxxx.ovpn config-file with your favorite texteditor and save it in:
|
|
||||||
C:\Program files\OpenVPN\config\. You should NOT use the "log" or "log-append"
|
|
||||||
options as OpenVPN GUI redirect the normal output to a log file itself.
|
|
||||||
There is a sample config files in the "sample-config" folder. Please
|
|
||||||
refer to the OpenVPN project homepage for more information regarding
|
|
||||||
creating the configuration file. http://openvpn.net/
|
|
||||||
|
|
||||||
|
|
||||||
Manual installation of OpenVPN GUI
|
Manual installation of OpenVPN GUI
|
||||||
**********************************
|
**********************************
|
||||||
|
|
||||||
* Download and install OpenVPN from http://openvpn.net/
|
* `Download <https://openvpn.net/index.php/download/community-downloads.html>`_
|
||||||
|
and install OpenVPN
|
||||||
|
|
||||||
* Download openvpn-gui-1.0.X.exe and save it in OpenVPN's bin folder.
|
* Download OpenVPN GUI of your choice and save it in OpenVPN's bin folder.
|
||||||
Default is "C:\Program Files\OpenVPN\bin\". You must put it in this folder
|
Default is *C:\\Program Files\\OpenVPN\\bin\\*. You must put it in this folder
|
||||||
because OpenVPN GUI depends on the OpenSSL DLLs installed in this folder by
|
because OpenVPN GUI depends on the OpenSSL DLLs installed in this folder by
|
||||||
OpenVPN.
|
OpenVPN.
|
||||||
|
|
||||||
* Create a xxxx.ovpn config-file with your favorite texteditor and save it in:
|
Configuring OpenVPN GUI to start on Windows logon
|
||||||
C:\Program files\OpenVPN\config\. You should NOT use the "log" or "log-append"
|
*************************************************
|
||||||
options as OpenVPN GUI redirect the normal output to a log file itself.
|
|
||||||
There is a sample config files in the "sample-config" folder. Please
|
|
||||||
refer to the OpenVPN project homepage for more information regarding
|
|
||||||
creating the configuration file. http://openvpn.net/
|
|
||||||
|
|
||||||
* Put a short-cut to openvpn-gui-1.0-X.exe in your
|
OpenVPN GUI can be configured to start automatically on logon to Windows from
|
||||||
"Start->All Program->StartUp" folder if you want the gui started automatically
|
its setting menu.
|
||||||
when you logon to Windows.
|
|
||||||
|
|
||||||
* Start the GUI by double-clicking the openvpn-gui-1.0.X.exe file. You need to
|
Adding an OpenVPN configuration file
|
||||||
be Administrator the first time you run OpenVPN GUI for it to create its
|
************************************
|
||||||
registry keys. After that you don't have to be administrator just to run the
|
|
||||||
GUI, however OpenVPN requires the user to be administrator to run!
|
To launch a VPN connections using OpenVPN GUI you need to add an OpenVPN
|
||||||
|
configuration file with .ovpn suffix. Any text editor (e.g. notepad.exe) can be
|
||||||
|
used to create a OpenVPN configuration files. Note that *log* and *log-append*
|
||||||
|
options are ignored as OpenVPN GUI redirects the normal output to a log file
|
||||||
|
itself. There are sample config files in the *sample-config* folder. Please
|
||||||
|
refer to the `OpenVPN project homepage <https://openvpn.net>`_ for more
|
||||||
|
information regarding creating the configuration file.
|
||||||
|
|
||||||
|
Once the configuration file is ready, you need to let OpenVPN GUI know about it.
|
||||||
|
There are three ways to do this:
|
||||||
|
|
||||||
|
* Place the file into the system-wide location, usually
|
||||||
|
*C:\\Program Files\\OpenVPN\\config\\*, or any of its immediate
|
||||||
|
subdirectories. This VPN connection will be visible for all users of the
|
||||||
|
system.
|
||||||
|
* Place the file into *C:\\Users\\username\\OpenVPN\\config\\*, or any of its
|
||||||
|
immediated subdirectories. The configuration file is only visible for the
|
||||||
|
user in question.
|
||||||
|
* Use the "Import file" function in OpenVPN GUI itself
|
||||||
|
|
||||||
Using OpenVPN GUI
|
Using OpenVPN GUI
|
||||||
#################
|
#################
|
||||||
|
|
||||||
When OpenVPN GUI is started your config folder (C:\Program Files\OpenVPN\config)
|
When OpenVPN GUI is started your OpenVPN config folder
|
||||||
will be scanned for .ovpn files, and an icon will be displayed in the taskbar's
|
(*C:\\Program Files\\OpenVPN\\config*) will be scanned for .ovpn files and the
|
||||||
status area.
|
OpenVPN GUI icon will appear in the system tray. Each OpenVPN configuration
|
||||||
|
file shows up as a separate menu item in the OpenVPN GUI tray, allowing you to
|
||||||
If you do not have any openvpn connection running, the config dir will be
|
selectively connect to and disconnect to your VPNs. The config dir will be
|
||||||
re-scanned for new config files every time you open the OpenVPN GUI menu by
|
re-scanned for new config files every time you open the OpenVPN GUI menu by
|
||||||
right-clicking the icon.
|
right-clicking the icon.
|
||||||
|
|
||||||
|
@ -69,45 +73,40 @@ prompted for the passphrase.
|
||||||
|
|
||||||
If you want OpenVPN GUI to start a connection automatically when it's started,
|
If you want OpenVPN GUI to start a connection automatically when it's started,
|
||||||
you can use the --connect cmd-line option. You have to include the extention
|
you can use the --connect cmd-line option. You have to include the extention
|
||||||
for the config file. Example:
|
for the config file. Example::
|
||||||
|
|
||||||
openvpn-gui --connect office.ovpn
|
openvpn-gui --connect office.ovpn
|
||||||
|
|
||||||
|
To get help with OpenVPN GUI please use one of the official `OpenVPN support
|
||||||
|
channels <https://community.openvpn.net/openvpn/wiki/GettingHelp>`_.
|
||||||
|
|
||||||
Run OpenVPN GUI as a Non-Admin user
|
Running OpenVPN GUI as a Non-Admin user
|
||||||
***********************************
|
***************************************
|
||||||
|
|
||||||
OpenVPN currently does not work as a normal (non-admin) user. OpenVPN GUI
|
OpenVPN 2.3.x and earlier bundle an OpenVPN GUI version (< 11) which has to be
|
||||||
2.0 will solve this by using an enhanced version of the OpenVPN service
|
run as admin for two reasons
|
||||||
to start and stop openvpn processes.
|
|
||||||
|
|
||||||
In the mean time, it is possible to use OpenVPN GUI to control the current
|
* OpenVPN GUI registry keys are stored in system-wide location
|
||||||
OpenVPN Service to start and stop a connection.
|
under HKEY_LOCAL_MACHINE, and they are generated when OpenVPN GUI was
|
||||||
|
launched the first time
|
||||||
|
* OpenVPN itself requires admin-level privileges to modify network settings
|
||||||
|
|
||||||
To use OpenVPN GUI to control the OpenVPN service, set the registry value
|
OpenVPN GUI 11 and later can make full use of the Interactive Service
|
||||||
"service_only" to '1'. See the section about registry values below.
|
functionality in recent versions of OpenVPN. This changes a number of
|
||||||
|
things:
|
||||||
Limitations with this way:
|
|
||||||
|
|
||||||
* There is no way for OpenVPN GUI ta hand over a password to the service
|
|
||||||
wrapper, so you can't use passphrase protected private keys or
|
|
||||||
username/password authentication.
|
|
||||||
|
|
||||||
* If you have multiple openvpn configurations, all will be started and
|
|
||||||
stopped at the same time.
|
|
||||||
|
|
||||||
* OpenVPN GUI is not able to retrieve any status info about the connections
|
|
||||||
from OpenVPN, so it will report connected as soon as the service is
|
|
||||||
started regarless of if OpenVPN has really succeded to connect or not.
|
|
||||||
|
|
||||||
* You cannot see the OpenVPN log in real-time.
|
|
||||||
|
|
||||||
|
* OpenVPN GUI can store its settings in user-specific part of the registry under
|
||||||
|
HKEY_CURRENT_USER
|
||||||
|
* OpenVPN is able to delegate certain privileged operations, such as adding
|
||||||
|
routes, to the Interactive service, removing the need to run OpenVPN with
|
||||||
|
admin privileges. Note that for this to work the *OpenVPNServiceInteractive*
|
||||||
|
system service has to be enabled and running.
|
||||||
|
|
||||||
Run Connect/Disconnect/Preconnect Scripts
|
Run Connect/Disconnect/Preconnect Scripts
|
||||||
*****************************************
|
*****************************************
|
||||||
|
|
||||||
There are three diffrent scripts that OpenVPN GUI can execute to help
|
There are three different scripts that OpenVPN GUI can execute to help
|
||||||
with diffrent tasks like mapping network drives.
|
with different tasks like mapping network drives.
|
||||||
|
|
||||||
Preconnect If a file named "xxx_pre.bat" exist in the config folder
|
Preconnect If a file named "xxx_pre.bat" exist in the config folder
|
||||||
where xxx is the same as your OpenVPN config file name,
|
where xxx is the same as your OpenVPN config file name,
|
||||||
|
@ -125,16 +124,18 @@ Disconnect If a file named "xxx_down.bat" exist in the config folder
|
||||||
Registry Values affecting the OpenVPN GUI operation
|
Registry Values affecting the OpenVPN GUI operation
|
||||||
***************************************************
|
***************************************************
|
||||||
|
|
||||||
All OpenVPN GUI reg-values are located below the following key:
|
All OpenVPN GUI registry values are located below the
|
||||||
HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN-GUI\
|
*HKEY_LOCAL_MACHINE\\SOFTWARE\\OpenVPN-GUI\\* key
|
||||||
|
|
||||||
The follow keys are used to control the OpenVPN GUI
|
The follow keys are used to control the OpenVPN GUI
|
||||||
|
|
||||||
config_dir
|
config_dir
|
||||||
configuration file directory, defaults to "C:\Program Files\OpenVPN\config"
|
the system-wide configuration file directory, defaults to
|
||||||
|
*C:\\Program Files\\OpenVPN\\config*; the user-specific configuration file
|
||||||
|
directory is hardcoded to *C:\\Users\\username\\OpenVPN\\config**.
|
||||||
|
|
||||||
config_ext
|
config_ext
|
||||||
file extension on configuration files, defaults to "ovpn"
|
file extension on configuration files, defaults to *ovpn*
|
||||||
|
|
||||||
connectscript_timeout
|
connectscript_timeout
|
||||||
Time in seconds to wait for the connect script to finish. If set to 0
|
Time in seconds to wait for the connect script to finish. If set to 0
|
||||||
|
@ -149,10 +150,10 @@ preconnectscript_timeout
|
||||||
value between 1-99.
|
value between 1-99.
|
||||||
|
|
||||||
exe_path
|
exe_path
|
||||||
path to openvpn.exe, defaults to "C:\Program Files\OpenVPN\bin\openvpn.exe"
|
path to openvpn.exe, defaults to *C:\\Program Files\\OpenVPN\\bin\\openvpn.exe*
|
||||||
|
|
||||||
log_dir
|
log_dir
|
||||||
log file directory, defaults to "C:\Program Files\OpenVPN\log"
|
log file directory, defaults to *C:\\Program Files\\OpenVPN\\log*
|
||||||
|
|
||||||
log_append
|
log_append
|
||||||
if set to "0", the log file will be truncated every time you start a
|
if set to "0", the log file will be truncated every time you start a
|
||||||
|
@ -198,11 +199,11 @@ show_balloon
|
||||||
|
|
||||||
log_viewer
|
log_viewer
|
||||||
The program used to view your log files, defaults to
|
The program used to view your log files, defaults to
|
||||||
"C:\windows\notepad.exe"
|
*C:\\Windows\\System32\\notepad.exe*
|
||||||
|
|
||||||
editor
|
editor
|
||||||
The program used to edit your config files, defaults to
|
The program used to edit your config files, defaults to
|
||||||
"C:\windows\notepad.exe"
|
*C:\\Windows\\System32\\notepad.exe*
|
||||||
|
|
||||||
passphrase_attempts
|
passphrase_attempts
|
||||||
Number of attempts to enter the passphrase to allow.
|
Number of attempts to enter the passphrase to allow.
|
||||||
|
@ -210,26 +211,7 @@ passphrase_attempts
|
||||||
All these registry options is also available as cmd-line options.
|
All these registry options is also available as cmd-line options.
|
||||||
Use "openvpn-gui --help" for more info about cmd-line options.
|
Use "openvpn-gui --help" for more info about cmd-line options.
|
||||||
|
|
||||||
|
|
||||||
If you have any problem getting OpenVPN GUI to work you can reach me via
|
|
||||||
email at mathias@nilings.se.
|
|
||||||
|
|
||||||
|
|
||||||
Building OpenVPN GUI from source
|
Building OpenVPN GUI from source
|
||||||
********************************
|
################################
|
||||||
|
|
||||||
* Download and install MinGW and MSYS from http://www.mingw.org/. I'm using
|
See `BUILD.rst <BUILD.rst>`_ for build instructions.
|
||||||
MinGW-3.2.0-rc-3 and MSYS-1.0.10.
|
|
||||||
|
|
||||||
* Download and install the binary distribution of OpenSSL from
|
|
||||||
http://www.slproweb.com/products/Win32OpenSSL.html
|
|
||||||
|
|
||||||
* Download and extract the OpenVPN GUI source archive.
|
|
||||||
|
|
||||||
* Start a bash shell by running msys.bat.
|
|
||||||
|
|
||||||
* Run at the OpenVPN GUI source directory::
|
|
||||||
|
|
||||||
$ autoreconf -i
|
|
||||||
$ ./configure
|
|
||||||
$ make
|
|
||||||
|
|
Loading…
Reference in New Issue