VPN Server Configuration in Linux

Source: Internet
Author: User

Nowadays, there are already a lot of computer operating systems, and Linux is becoming more and more popular in today's society. Do you know about Linux systems? Are you an application of Linux? This article describes in detail the VPN Server Configuration in Linux, which plays a role in learning the VPN Server Configuration in Linux. Here we do not focus on hardware VPN, but only on VPN in Linux.

1. Install the VPN package.

Requires dkms-2.0.10-2.fc5.noarch.rpm, kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm, ppp-2.4.3-9.2.i586.rpm and pptpd-1.3.1-0.i386.rpm for these rpm packages. Then run the command # rpm-ivh dkms-2.0.10-2.fc5.noarch.rpm; rpm-ivh kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm; rpm-ivh ppp-2.4.3-9.2.i586.rpm; rpm-ivh pptpd-1.3.1-0.i386.rpm to complete the installation.

2. Configure the VPN service.

There are two files to be modified: The Master configuration file/etc/pptpd. conf and the VPN user account file/etc/ppp/chap-sescrets. In the main configuration file, you must set the local address of the VPN Server and the address segment allocated to the client. Therefore, you only need to manually append localip and remoteip in the main configuration file to complete the configuration task. The account file stores the authentication information required for the VPN Client to dial in. The format is:

User name, service password, password assigned to the user

The user name, password, and IP address assigned to the user must be enclosed in double quotation marks. The "service" is generally pptpd. For reference, the following is an instance of pptpd. conf and chap-secrets:

# More/etc/pptpd. conf

Localip 192.168.1.254 (Server ip)

Remoteip 192.168.1.230-240 (address pool allocated to the client)

# More/etc/ppp/chap-screts

"Guoxing" (User Name) pptpd "guoxing" (password) "*" (ip address retrieved from the address pool)

"Public" pptpd "wgzx" "192.168.1.202" (you can specify the ip address allocated to the client)

3. Client configuration.

To use the windows Network Connection wizard, you only need to select "connect to VPC through ineternet (V)" to complete the configuration step by step. Note: the IP address of the VPN Server must be the unique Unicast address in the world, that is, the eth0 address of the gateway server.

4. Enable the VPN service.

Before enabling VPN, make sure that the kernel IP forwarding function is enabled. Then run the command # service pptpd start to enable VPN and wait for remote user access.

PS: At the beginning, I downloaded the four software packages required by vpn from the Internet. They were downloaded from the open-source community but could not be installed. It was strange that I got these four software packages from another channel, the discovery is much larger than the files provided by the open-source community, and is finally installed, so do not be superstitious. In addition, the address of the vpn Server set in it is a local address, which is equivalent to the eth0 address. When connecting to the Intranet as a client, enter the eth1 address of the vpn Server (which must be globally unique). The linux server also needs packet forwarding.

In this way, you have completed the VPN Server Configuration in Linux.

  1. Learn to delete old Linux Kernel
  2. Measure the test taker's knowledge about how to prevent attacks on Linux operating systems.
  3. Teach you how to display duplicate rows in Linux
  4. How to install and Uninstall Linux software
  5. Yuan Meng: an endless Linux Desktop Innovation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.