Ubuntu Linux
 
 
 
 
Home      vpn server and client setup in ubuntu
ubuntu linux
Ubuntu Technical Documentation
Ubuntu 7.10 to 9.04 Documentation
 
OpenVpn Server and Client set-up in Ubuntu
Download and save the appropriate Debian package (.deb) file.
For Download we need to register an account in openvpn.net
Then go to the directory where you placed the downloaded file and enter the following command line, substituting the package filename:
 
 
 


As root, install the OpenVPN-AS package.

#dpkg -i openvpn-as-1.2.2-Ubuntu8.amd_64.deb


Run the “ovpn-init” program to choose initial settings
 
#/usr/local/openvpn_as/bin/ovpn-init

Access the Admin Web UI to continue configuration

Obtain a license key from the License Page and activate it via the Admin Web UI

Using the Admin Web UI, configure the desired network and authentication settings, then start the VPN Server

Remote users login to the Client Web Server and download a pre-configured Windows VPN Client software installer or client configuration file

Immediately after installing the Windows VPN Client software, remote users can access the VPN
 
Examples:
 
My network eth0 212.xx.xx.xx - public ip
                        eth1 192.168.2.2   - private ip
 
Step1
 
ubutnulinux@ubutnu-desktop:~/Desktop$ sudo dpkg -i openvpn-as-1.2.2-Ubuntu9.i386.deb
Selecting previously deselected package openvpn-as.
(Reading database ... 134182 files and directories currently installed.)
Unpacking openvpn-as (from openvpn-as-1.2.2-Ubuntu9.i386.deb) ...
Setting up openvpn-as (1.2.2-Ubuntu9) ...
Please configure OpenVPN-AS by running /usr/local/openvpn_as/bin/ovpn-init

Step 2

  
ubutnulinux@ubutnu-desktop:~/Desktop$ sudo /usr/local/openvpn_as/bin/ovpn-init

          OpenVPN Access Server v1.1
          Initial Configuration Tool
------------------------------------------------------
Once you provide a few initial configuration settings,
OpenVPN Access Server can be configured by accessing
its Admin Web UI using your Web browser.


Please specify the network interface and IP address to be
used by the Admin Web UI:
(1) all interfaces: 0.0.0.0
(2) eth0: 212.XX.XX.XX
(3) eth0:0: 192.168.2.2
Please enter the option number from the list above (1-3).
> Press Enter for default [2]: 2

Please specify the port number for the Admin Web UI.
> Press ENTER for default [8443]:

To initially login to the Admin Web UI, you must use a
username and password that successfully authenticate you
with the host UNIX system (you can later modify the settings
so that RADIUS or LDAP is used for authentication instead).

You can login to the Admin Web UI as 'root' with your existing
root password or specify a different user account to use for this
purpose. If you choose to use a non-root account, you can create
a new user account or specify an existing user account.

Do you wish to login as 'root'?
> Press ENTER for default [yes]: no

> Specify the username for an existing user or for the new user account: test
Type the password for the 'test' account:
Confirm the password for the 'test' account:

Initializing OpenVPN...
Adding new user login...
useradd "test"
Writing as configuration file...
Writing config.json...
Perform sa init...
Wiping any previous userdb...
Creating default profile...
Modifying default profile...
Adding new user to userdb...
Modifying new user as superuser in userdb...
Getting hostname...
Hostname: sahab-desktop
Preparing web certificates...
Getting web user account...
Adding web group account...
Adding web user account...
Adding web group...
Adjusting license directory ownership...
Initializing userdb...
Generating init scripts...
Generating PAM config...
Generating init scripts auto command...
Starting openvpnas...

NOTE: Your system clock must be correct for OpenVPN Access Server
to perform correctly.  Please ensure that your time and date
are correct on this system.

Initial Configuration Complete!

You can now continue configuring OpenVPN Access Server by
directing your Web browser to this URL:

https://202.xx.xxx.xx.xx:8443/admin

Login as "test" with the same password used to authenticate
to this UNIX host.

See the Release Notes for this release at:
   http://www.openvpn.net/access-server/rn/openvpn_as_1_2_2.html
 
 
We can use system user as a vpn user, Here I have created one test user for accessing the vpn.

Then login the admin url and activate the licence key then setup network as well as vpn configuration. The screenshots given below for vpn setting
 
 

Page 2