Saturday, June 1, 2013

The Differences Between PPTP, L2TP/IPSec, SSTP and OpenVPN Connection


PPTP

Point-To-Point-Tunneling Protocol (PPTP) is the most popularly VPN protocol and is supported by the most devices. PPTP stands for point to point protocol, is by far the easiest to configure and has low overhead that makes it faster than other VPN protocols. Firewalls such as ISA Server, Cisco PIX and Sonic Wall recognize the protocol.
PPTP encrypts data using a 128-bit key which puts it in the “weakest” category of VPN protocols. It has also had other weaknesses in the past, such as clear-text authentication prior to a connection being established and as such it is rarely used in sensitive business environments. However, the most recent implementations of this protocol have resolved some of the security issues – for example, the implementation of EAP authentication.

L2TP/IPSec

Layer 2 Tunneling Protocol (L2TP) came about through a partnership between Cisco and Microsoft with the intention of providing a more secure VPN protocol. L2TP is considered to be a more secure option than PPTP, as the IPSec protocol which holds more secure encryption algorithms, is utilized in conjunction with it. It also requires a pre-shared certificate or key. L2TP’s strongest level of encryption makes use of 168 bit keys, 3 DES encryption algorithm and requires two levels of authentication.
L2TP has a number of advantages in comparison to PPTP in terms of providing data integrity and authentication of origin verification designed to keep hackers from compromising the system. However, the increased overhead required to manage this elevated security means that it performs at a slower pace than PPTP.

SSTP

Secure Socket Tunneling Protocol (SSTP) is viewed as the VPN protocol with the highest security due to authenticating with 2048 bit key certificates and encrypting with 256 bit key. SSTP can be used in place of other VPN protocols (PPTP, L2TP), and is effective in locations where network access is restricted as it uses TCP port 443, the same port used by Secure Socket Layer (SSL) transmissions.
SSTP VPN is viewed as quicker and more reliable than OpenVPN. However, your operating system needs to be relatively up to date in order for it to function properly with SSTP.
The major disadvantage of SSTP is that since it was developed by Microsoft it only functions on Windows Vista / Windows 7 / Windows 8. Currently, there are no intentions to make the protocol available to users of Mac OS, Linux and older versions of Windows.

OpenVPN

OpenVPN was developed by Open Source software as a free alternative to Microsoft’s SSTP protocol. One major advantage of this particular protocol is that it functions on a variety of operating systems, such as, Mac OS, Windows, Linux and some IP phones. Similar to SSTP, OpenVPN has a higher encryption level than L2TP as it operates on both Layer 2 and Layer 3. Furthermore, it is accompanied with extra features such as transporting Ethernet frames, IPX packets and providing NETBIOS functionality.
A minor disadvantage with OpenVPN is that it provides insufficient support for mobile devices and the requirement to install a 3rd party client. This is not the case for SSTP.
A major disadvantage with VPN is the high overhead associated with the protocol due to its level of encryption. It may also be quite challenging to configure.

Monday, May 20, 2013

OpenVPN Installation on Ubuntu 12.04


Server Installation

To install openvpn in a terminal enter:
sudo apt-get install openvpn

Public Key Infrastructure Setup

The first step in building an OpenVPN configuration is to establish a PKI (public key infrastructure). The PKI consists of:
  • a separate certificate (also known as a public key) and private key for the server and each client, and
  • a master Certificate Authority (CA) certificate and key which is used to sign each of the server and client certificates.
OpenVPN supports bidirectional authentication based on certificates, meaning that the client must authenticate the server certificate and the server must authenticate the client certificate before mutual trust is established.
Both server and client will authenticate the other by first verifying that the presented certificate was signed by the master certificate authority (CA), and then by testing information in the now-authenticated certificate header, such as the certificate common name or certificate type (client or server).

Certificate Authority Setup

To setup your own Certificate Authority (CA) and generating certificates and keys for an OpenVPN server and multiple clients first copy the easy-rsa directory to /etc/openvpn. This will ensure that any changes to the scripts will not be lost when the package is updated. From a terminal change to user root and:
mkdir /etc/openvpn/easy-rsa/
cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/easy-rsa/
Next, edit /etc/openvpn/easy-rsa/vars adjusting the following to your environment:
export KEY_COUNTRY="US"
export KEY_PROVINCE="NC"
export KEY_CITY="Winston-Salem"
export KEY_ORG="Example Company"
export KEY_EMAIL="steve@example.com"
Enter the following to generate the master Certificate Authority (CA) certificate and key:
cd /etc/openvpn/easy-rsa/
source vars
./clean-all
./build-ca

Server Certificates

Next, we will generate a certificate and private key for the server:
./build-key-server myservername
As in the previous step, most parameters can be defaulted. Two other queries require positive responses, "Sign the certificate? [y/n]" and "1 out of 1 certificate requests certified, commit? [y/n]".
Diffie Hellman parameters must be generated for the OpenVPN server:
./build-dh
All certificates and keys have been generated in the subdirectory keys/. Common practice is to copy them to /etc/openvpn/:
cd keys/
cp myservername.crt myservername.key ca.crt dh1024.pem /etc/openvpn/

Client Certificates

The VPN client will also need a certificate to authenticate itself to the server. Usually you create a different certificate for each client. To create the certificate, enter the following in a terminal while being user root:
cd /etc/openvpn/easy-rsa/
source vars
./build-key client1
Copy the following files to the client using a secure method:
  • /etc/openvpn/ca.crt
  • /etc/openvpn/easy-rsa/keys/client1.crt
  • /etc/openvpn/easy-rsa/keys/client1.key
As the client certificates and keys are only required on the client machine, you should remove them from the server.

Simple Server Configuration

Along with your OpenVPN installation you got these sample config files (and many more if if you check):
root@server:/# ls -l /usr/share/doc/openvpn/examples/sample-config-files/
total 68
-rw-r--r-- 1 root root 3427 2011-07-04 15:09 client.conf
-rw-r--r-- 1 root root 4141 2011-07-04 15:09 server.conf.gz
Start with copying and unpacking server.conf.gz to /etc/openvpn/server.conf.
sudo cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/
sudo gzip -d /etc/openvpn/server.conf.gz
Edit /etc/openvpn/server.conf to make sure the following lines are pointing to the certificates and keys you created in the section above.
ca ca.crt
cert myservername.crt
key myservername.key 
dh dh1024.pem
That is the minimum you have to configure to get a working OpenVPN server. You can use all the default settings in the sample server.conf file. Now start the server. You will find logging and error messages in your syslog.
root@server:/etc/openvpn# /etc/init.d/openvpn start
 * Starting virtual private network daemon(s)...
   *   Autostarting VPN 'server'                     [ OK ]
Now check if OpenVPN created a tun0 interface:
root@server:/etc/openvpn# ifconfig tun0
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.1  P-t-P:10.8.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
[...]

Simple Client Configuration

There are various different OpenVPN client implementations with and without GUIs. You can read more about clients in a later section. For now we use the OpenVPN client for Ubuntu which is the same executable as the server. So you have to install the openvpn package again on the client machine:
sudo apt-get install openvpn
This time copy the client.conf sample config file to /etc/openvpn/.
sudo cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf /etc/openvpn/
Copy the client keys and the certificate of the CA you created in the section above to e.g. /etc/openvpn/ and edit /etc/openvpn/client.conf to make sure the following lines are pointing to those files. If you have the files in /etc/openvpn/ you can omit the path.
ca ca.crt
cert client1.crt
key client1.key
And you have to at least specify the OpenVPN server name or address. Make sure the keyword client is in the config. That's what enables client mode.
client
remote vpnserver.example.com 1194
Now start the OpenVPN client:
root@client:/etc/openvpn# /etc/init.d/openvpn start
 * Starting virtual private network daemon(s)...   
   *   Autostarting VPN 'client'                          [ OK ] 
Check if it created a tun0 interface:
root@client:/etc/openvpn# ifconfig tun0
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.6  P-t-P:10.8.0.5  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
Check if you can ping the OpenVPN server:
root@client:/etc/openvpn# ping 10.8.0.1
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.1: icmp_req=1 ttl=64 time=0.920 ms

Saturday, November 3, 2012

Install VMware View Client on Ubuntu 12.04



  •  Note :-

        VMware View Client for Linux does not support these features :-

            USB Redirection.

            Wyse-MMR.

            Local Mode Desktop.

  •  Open the /etc/apt/sources.list file using text editor.

        Uncomment these lines:-

        deb http://archive.canonical.com/ubuntu precise partner

        deb-src http://archive.canonical.com/ubuntu precise partner

  •  Run these commands in the terminal :-

        sudo apt-get update

        sudo apt-get install rdesktop

        sudo apt-get install vmware-view-client

        sudo apt-get install ia32-libs

Thursday, November 1, 2012

RemoteFX Installation on Windows 2008 R2 Server


  • Note :-
  • Windows 2008 R2 64 Bit Server is compulsory for server OS.
  • Its require GPU (Graphical Precessing Unit) on Server.
  • Description :-
  • One of the new feature added in Windows 2008 R2 Server's Remote Desktop Service which is called as RemoteFX.
  • In RemoteFX service Multimedia feature added compare to Terminal Service or Remote Desktop Service.
  • Like.. Video Redirection, Microphone Redirection, Audio Redirection, Printer Redirection, USB Redirection.
  •  Installation of RemoteFX Service :-
  • Insert your Windows 2008 R2 Server DVD Media in DVD ROM.
  • Go to Start => Programs => Administrative Tools => Server Manager.
  • Go to Roles and click on Add Roles.
  • Check mark on Remote Desktop Service and Click on Next.
  • Check Mark on following services :-
  • Remote Desktop Session Host.
  • Remote Desktop Virtualization Host.
  • Core Services.
  • RemoteFX.
  • Remote Desktop Licensing.
  • Tick mark on Do not require Network level Authentication.
  • Tick Mark on Per User.
  • Add Everyone User.
  • Check Mark on Following options.
  • Audio and video playback.
  • Audio recording redirection.
  • Desktop Composition.
  • Click on Install then reboot your server.
  • Remote Desktop Session host Configuration :-
  • Go to Start => Programs => Administrative Tools => Remote Desktop Services => Remote Desktop Session Host Configuration.
  • Right click 0n RDP-Tcp and clik on Properties.
  • Select Client Settings tab.
  • On Colour Depth check mark on Limit Maximum Colour Depth and select 32 bits per pixel.
  • Remove Check Mark from Redirection => Disable the followings :-
  • Drive.
  • Windows Printer.
  • LPT Port.
  • COM Port.
  • Clipboard.
  • Audio and video playback.
  • Audio recording.
  • Supported Plug and Play Devices.
  • Default to main client printer.
  • Then click on Apply and OK.
  • Group Policy Settings :-
  • Click on Start => Run and type gpedit.msc then press enter.
  • Click on Computer Configuration => Administrative Templates => Windows Components => Remote Desktop Services.
  • Click on Remote Desktop connection client :-
  • Go to RemoteFX USB Device Redirection.
  • Double click on Allow RDP redirection of other supported RemoteFX USB devices from this computer.
  • Tick Mark on Enabled then Click on Apply and OK.
  • Go to Remote Desk top Session Host.
  • Device and Resource Redirection :-
  • Enable "Allow audio and video playback redirection" policy.
  • Enable "Allow audio recording redirection" policy.
  • Enable "Limit audio playback quality" policy.
  • Disable "Do not allow clipboard redirection" policy.
  • Disable "Do not allow COM port redirection" policy.
  • Disable "Do not allow drive redirection" policy.
  • Disable "Do not allow LPT port redirection" policy.
  • Disable "Do not allow supported Plug and Play devices redirection" policy.
  • Disable "Do not allow smart card device redirection" policy.
  • Enable "Allow time zone redirection" policy.
  • Remote Session Environment :-
  • Enable "Limit maximum colour depth" policy and select 32 bits pixel.
  • Disable "Enforce Removal of Remote Desktop Wallpaper" policy.
  • Enable "Configure RemoteFX" policy.
  • Enable "Optimize visual experience when using RemoteFX" policy.
  • Enable "Optimize visual experience Remote Desktop services sessions" policy.
  • Enable " Allow desktop compositions for remote desktop sessions" policy.
  • Now reboot your server and connect from thin Client.

Thursday, September 27, 2012

VPN Server Configuration on Windows 2008 Server.


  • Note:-
  • We don't have required Active Directory for configuring VPN Server on Windows 2008.
  • Required two LAN Cads one for Internal & Internet & second for VPN network.
  • Static Public IP address required for Internet.
  • Basic Configuration:-
  • Give LAN-1 Local IP address (Like; 192.168.10.10), Subnet Mask (Like; 255.255.255.0) Gateway (Like; 192.168.10.1) and DNS (Like; 192.168.10.1)then check the Internet connection is proper working or not.
  • Give LAN-2 Different IP Address of your Network (Like; 192.168.100.10) & Subnet Mask (Like; 255.255.255.0).
  • Install Service:-
  • Insert Windows 2008 server CD on CD-ROM.
  • Go to Start => Programs => Administrative Tools => Server Manager.
  • Go to Roles and Click on Add Roles.
  • Tick mark on Network Policy and Access Services then click on Next.
  • Tick mark on Routing and Remote Access Services then Click on Next.
  • Click on Install, after installation click on Close.
  • VPN Server Configuration:-
  • Go to Start => Programs => administrative tools => Routing and Remote Access.
  • Right click on your server name and click on Configure and Enable Routing and Remote access.
  • Prompt for Routing and Remote Access Server Setup wizard click on Next.
  • Tick mark on Virtual Private Network (VPN) access ans NAT and click on next.
  • Select the network interface that connects this server to the Internet, I have selected LAN-1 because i have configured LAN-1 for Internet connection and click on Next.
  • Select From a specified range of addresses and click on Next.
  • Click on New for Address Range Assignment.
  • I have given LAN-2 IP Address is 192.168.100.10 so i am assigning Start IP address 192.168.100.100 & End IP address 192.168.100.200 for client then click on O.K. & Next.
  • Select No, use Routing and Remote Access to authenticate connection requests and click on Next.
  • Click On Finish.
  • Dial-up User Configuration:-
  • Right Click on My Computer and click on Manage.
  • Go to Configuration => Local Users and Groups and right click on users & click on Create User.
  • Create a user and give him password (I have created Mayur user).
  • Click on created User's properties and click on Dial-in.
  • Tick mark on Allow access on Remote Access Permissions and click O.K.
  • f you are using Router for Internet connection then forward your server IP address on DMZ port.

----: Now your VPN Server is ready for use :-----

VPN Server Configuraton on Windows 2003 Server


  • Note:-
    • We don't have required Active Directory for configuring VPN Server on Windows 2003.
    • Required two LAN Cads one for Internal & Internet & second for VPN network.
    • Static Public IP address required for Internet.
  • Basic Configuration:-
    • Give LAN-1 Local IP address (Like; 192.168.10.10), Subnet Mask (Like; 255.255.255.0) Gateway (Like; 192.168.10.1) and DNS (Like; 192.168.10.1)then check the internet connection is proper working or not. 
    • Give LAN-2 Different IP Address of your Network (Like; 192.168.100.10) & Subnet Mask (Like; 255.255.255.0).
  • Install Service:-
    • Go to Start => Settings => Control Panel and Open Add Remove Programs.
    • Insert Windows 2003 server CD on CD-ROM and click on Add Remove Windows Component.
    • Tick mark on Remote Installation Service (On Service Pack to Windows Deployment Service).
    • Click on next button finish it and reboot your Server.
  • VPN Server Configuration:-
    • Go to Start => Programs => administrative tools => Routing and Remote Access.
    • Right click on your server name and click on Configure and Enable Routing and Remote access.
    • Prompt for Routing and Remote Access Server Setup wizard click on Next.
    • Tick mark on Virtual Private Network (VPN) access ans NAT and click on next.
    • Select the network interface that connects this server to the Internet, I have selected LAN-1 because i have configured LAN-1 for Internet connection.
    • Remove tick mark from Enable security on the selected interface by Basic Firewall and click on Next.
    • Select From a specified range of addresses and click on Next.
    • Click on New for Address Range Assignment.
    • I have given LAN-2 IP Address is 192.168.100.10 so i am assigning Start IP address 192.168.100.100 & End IP address 192.168.100.200 for client then click on O.K. & Next.
    • Click on Enable basic name and address services and click on Next.
    • Select No, use Routing and Remote Access to authenticate connection requests and click on Next.
    • Click On Finish.
  • Dial-up User Configuration:-
    • Right Click on My Computer and click on Manage.
    • Go to Local Users and Groups and right click on users & click on Create.
    • Create a user and give him password (I have created Mayur user).
    • Click on created User's properties and click on Dial-in.
    • Tick mark on Allow access on Remote Access Permissions and click O.K.
    • f you are using Router for Internet connection then forward your server IP address on DMZ port.
       
----: Now your VPN Server is ready for use :-----

VPN Client Configuration on Windows XP


  • Note:-
    • Any type of Internet connection you can use.
    • Not required Static Public IP address.
  • Configuration of VPN Client:-
    • Give IP address, subnet mask, gateway and DNS on your XP machine and check that Internet connection is properly working or not.
    • Go to My Network Places Properties.
    • Click on Create on new connection on Network Tasks.
    • Select Connect to the network at my workplace and click on Next.
    • Select Virtual Private Network connection and click on Next.
    • Give Any connection name ( I am giving VPN) & click on Next.
    • Give real IP address of your VPN server ( Static Public IP ) and click on next & Finish.
    • Go to My Network Places properties.
    • Go to Virtual Private Network properties.
    • Go to Networking.
    • Select Internet protocol (TCP/IP) and Click on Advanced.
    • Remove Check mark from Use default gateway on remote network & click on O.K.
    • Double click on VPN Dial-up connection and give user name & password which you have created on server then dial.
  • Your VPN Client connection is configured successfully for testing it ping to your VPN Server.