Monday, November 19, 2012

VPN server




Virtual private network (VPN)
A virtual private network (VPN) extends a private network and the resources contained in the network across public networks like the internet. It enables a host computer to send and receive data across shared or public networks by emulating the properties of the private network such as shares, server access, and printers by establishing and maintaining the security and management policies of the private network.
VPN server configuration using PPTP
Service profile
Service: pptpd
Package: pptpd
Port no:1723(TCP)
Configuration file: /etc/pptpd.conf
                                /etc/ppp/chap-secrets
 Script file: /etc/ init.d/pptpd
Daemons: pptpd
Objective :To act extends a private network and the resources contained in the network across public networks
Install the package
[root@vpn~]#yum install pptpd* -y
Edit the main configuration file
[root@vpn~]#vi /etc/pptpd.conf
localip 192.168.0.1
remoteip
 192.168.0.2-254
:wq!
Now set the VPN login ID and password
[root@vpn~]#vi /etc/ppp/chap-secrets
Vpnusername   pptpd      vpnpassword    *     # * indicates the vpn client ip and pptpd is fixed
Note: instead of * we can use different client address
:wq!
[root@vpn~]#chkconfig pptpd on
[root@vpn~]#service pprtpd restart

Client configuration for windows  Xp
Start->control panel->network connections->Setup a new connection or network->in the network connection wizard,click next->select connect to the network at my work place and then click next->select VPN connection and click next->selct don’t dial initial connection and click next->vpn server IP ->ask to selct smart card->Finish
Then goto networkconnection and right click on the new connection and selct connect

OpenVPN configuration
Service profile
Service: openvpn
Package: openvpn
Port no:1194(UDP)
Configuration file: /etc/openvpn/myhomelan
                                /etc/openvpn/myhomelan/local.conf
 Script file: /etc/ init.d/openvpn
Daemons: openvpn
Objective :To act extends a private network and the resources contained in the network across public networks
Install the package
[root@vpn~]# yum install openvpn* -y
 Create a directory
[root@vpn~]#mkdir /etc/openvpn/myhomelan
 Edit configuration file
[root@vpn~]#cd /etc/openvpn/myhomelan
[root@myhomelan]#openvpn --genkey --secret myhomelan-key.txt
[root@vpn~]#vi /etc/openvpn/myhomelan/local.conf
  dev tun if config 192.168.0.1 192.168.0.20
 secret /etc/openvpn/myhomelan/homeland-key.txt
comp-lzo
port-1194
user-nobody
group-nobody
:wq!
[root@vpn~]#chkconfig openvpn on
[root@vpn~]#service openvpn restart

Stay Connected With Free Updates!

Subscribe via Email

Follow me!

Leave Your Comment Below If You Like This Post

0 comments: