Archive

Posts Tagged ‘VPN’

CentOS: How to set up a VPN server (PPTP) Part.4

September 17th, 2011 No comments

How to set up a VPN server (PPTP) with CentOS

Have the resources on the local network even when you are physically out of the office is a goal within reach of any system administrator. Just a machine with CentOS, just and open source software are some tips to configure all the best.

As anticipated at the beginning, the technique proposed here is not exactly “old hat”. Consequently, there are many aspects that may hinder the proper functioning of the VPN.

This page of the official documentation offers a wide array of tests, tips and solutions to various problems: I have summarized below the most common.

The client can not connect

If the service is started (you can check quickly by giving service pptpd restart), but clients can not connect, it means that there is some “barrier”.

Move the two computers within the same LAN and try again: If it works, almost certainly means that you have properly configured the router.

Otherwise, the firewall may not let the traffic properly: try to disable it temporarily (perhaps by disconnecting everything from the Internet to prevent security problems!) And try again.

The connection is established but the computer does not see

If the VPN connection is established correctly, but PCs are not accessible, could be a configuration problem.

On the client, run ping 192.168.0.201 (substituting the appropriate IP address of VPN server) and Make sure you get a response.

If not, run yum install tcpdump-y on the server to install a software-capture packets, then proceed with tcpdump-n-i ppp0 and try again to ping: If the terminal does not appear to informational messages, means that the client is not “talking” in any way with the server.
Server and VPN client are spoken, the VPN client and PC LAN no

Trace the cause of this problem is far from easy.

Check that the server itself is having problems communicating with other PCs on the LAN and, perhaps, try to download an updated version of the script routing.

Unable to access files and printers

If everything works, but you can not share resources, you have probably a problem with the specific features of Windows: See the article “Setting up a computer network (LAN)” for more information.

CentOS: How to set up a VPN server (PPTP) Part.2

September 16th, 2011 1 comment

How to set up a VPN server (PPTP) with CentOS

 

Options.pptd

To begin configuration, open the options file with this command:

gedit /etc/ppp/options.pptpd


The default settings are already optimal, but you must specify which server to use DNS to resolve domain names.

Try (Find command in the toolbar) string #ms-dns. Then replace it with this statement:

ms-dns 208.67.220.220


centos vpn

This will ensure that clients connected via VPN using OpenDNS in order. It goes without saying that those who have a local name server are free to prefer that.

Save and close the file.
Pptpd.conf

Now edit the main configuration software. Launch

gedit /etc/pptpd.conf

Now comes the part a little more delicate. We have to choose:

  • an IP address for the server’s VPN interface
  • a range of IP addresses that the server will assign to the VPN client connected

To get the best results and avoid an endless series of complications, both the server address, and those that will be distributed to clients must be on the same network used by our internal LAN.

For example, we might choose for the server 192.168.0.201 and 192.168.0.202, 192.168.0.203, and so on up to 192.168.0.254 for remote computers: bring rapidly to the end of the document and enter two lines like this:

localip 192.168.0.201

remoteip 192.168.0.2-254

Save and close the file.

This stage is completed, you should ensure that the service it provides to the LAN IP addresses, in turn, does not distribute these addresses! If you performed the steps in “Help: to create a DHCP server with CentOS, the file is already set up ready for use in an appropriate manner: to be sure, given gedit /etc/dhcpd.conf, try and check the string range reported that the value is

192.168.0.2 192.168.0.200

In this case, dhcpd will assign only the addresses from .2 to .200, .201 and leaving the next available VPN.
Chap-secrets

As a final preparation phase of the service, we must not do is specify a list of user names and passwords are allowed to connect. The individual credentials must then be communicated to clients and set in the remote PC.

Open gedit /etc/ppp/chap-secrets. To create the various accounts, add a line for each user, basing on this model:

NomeUtenteClient pptpd PasswordAssociata *

CENTOS VPN

A practical example might be:

gianluigi.zanettini pptpd passwordsegreta *

pptpd mouse disneyland *

peter.parker pptpd Spiderman *

Save and close the file.
Auto-Start and start the service

Given service pptpd start in the terminal to start the service. If everything is working, will be shown an encouraging OK Green.

Set the daemon so that it auto-start each time after launching the server chkconfig pptpd on (or by checking the check box and then clicking on pptpd the Save button in System -> Administration -> Services.

CentOS : How to set up a VPN server (PPTP)

September 16th, 2011 No comments

How to set up a VPN server (PPTP) with CentOS

CENTOS VPN

Have the resources on the local network even when you are physically out of the office is a goal within reach of any system administrator. Just a machine with CentOS, just and open source software are some tips to configure all the best.

We have already spoken several times of Technology Virtual Private Networking (VPN) and of the many advantages obtained by providing the appropriate technical infrastructure

For those who are completely empty stomach of the subject, suffice it to say that, having a VPN, the computers become able to exchange files, share printers and, more generally, access to resources as if they were part of the same local area network (LAN) even if the workstations in question are physically located miles away from each other.

This means, for example, that can be aggregated to the office LAN also the location of the house (or vice versa), or create a network “local” permanent friends, even when the computers are located in different homes.

All data is encrypted in transit, and participation in the network is limited by imposing a password: confidentiality, in short, is guaranteed.

That’s exactly what you want?

This guide is dedicated to an audience of administrators or geeks who are willing to take on a number of technical complications at the cost of achieving the goal.

There are much simpler solutions that are more suitable for the average user: the use of Hamachi, Comfortable EasyVPN, Wippien or other alternatives are generally recommended.

Create a VPN server with Windows

Throughout this article, we will see how to set up a VPN server with CentOS.

A similar result can also be reached by using a simple Windows PC: we talked at greater length in “Accept VPN (PPTP) with Windows 7 in a few clicks.”

Requirements

The only real requirement is the presence of a “super routerCentOS driving your network. Before continuing, Make sure you have prepared as detailed in “Creating a” super router “with an old PC and CentOS.”

Since the VPN server must be always reachable by clients requiring the connection, the computer must remain on (or be prepared so as to obtain a Wake-on-Internet) and connected to the worldwide network.

As usual when it comes to accepting connections from the outside, the server can not use connectivity provided by Fastweb or via UMTS / HSDPA: the masked IP system adopted by these operators in fact inhibit such a scenario.

It is necessary to perform most tasks with root privileges: for convenience, I suggest you direct access to the system with that account. If you prefer to use your user deprivilegiato, however, could be enough to launch all the controls proposed by prefixing the string sudo.
Installation

To create our VPN, we use the package pptpd / PopTop: in addition to the benefits of open source license, I chose this tool for the many competitors for the excellent compatibility with the Windows client and the linearity of the installation.

To achieve this, open a terminal window (Application -> Accessories -> Terminal) and add the key used to sign packages (for more information about this step, see “How to add and remove repositories on CentOS”

rpm - import http://poptop.sourceforge.net/yum/RPM-GPG-KEY-PPTP

Continue with adding a reference to its repository:

rpm-Uvh http://poptop.sourceforge.net/yum/stable/rhel5/pptp-release-current.noarch.rpm

Clear the cache of yum with yum clean all and finish with the installation of component:

yum install ppp pptpd-y.

Next Page

CentOS: How to set up a VPN server (PPTP) Part.2

CentOS: How to set up a VPN server (PPTP) Part.3