How to configure PPTP VPN client and squid Transparent gateway in CentOS 6.0

Source: Internet
Author: User
Tags account security centos firewall linux

purpose:

Build a single network card Linux gateway (transparent proxy). The gateway is dialed into an overseas VPN server. After the client sets the gateway, the network exit is an overseas VPN server, which speeds up access to some websites.

Environmental information:

Hardware: one DELL machine, single network card (IP: 10.39.100.253);

Machine name: VpnGW

Operating system: CentOS 6.0 Kernel Linux 2.6.32-71.el6.i686

Network environment: The local area network firewall needs to allow the machine to dial in a public network IP using the PPTP protocol

installation steps:

One. Install operating system, set IP, machine name, close firewall, SELinux;

Modify the host name: The configuration file for setting the CentOS host name is: / etc / sysconfig / network

Modify the hosts file: modify the / etc / hosts file

Close SELinux: modify / etc / sysconfig / selinux

SELINUX = disabled #This is the most standard way

Set the system to use EPEL source:

CentOS 6.x 32-bit (x86 / i386):

rpm –Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

CentOS 6.x 64-bit (x64):

rpm –Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm

two. install software;

Check the installation of ppp, pptp, pptp-setup, if not, yum install;

three. Use the pptpsetup command to create a VPN node;

Usage and description of pptpsetup command:

pptpsetup --create <TUNNEL> --server <ip address / hostname> [--domain <DOMAIN NAME>] --u sername <USERNAME> [--password <PASSWORD>] [--encrypt] [--start]
pptpsetup --delete <TUNNEL> delete a node
Options:

* <TUNNEL> The name of the connection created is self-specified.

* <SERVER> IP or domain name of PPTP SERVER.

* In the domain where <DOMAIN> is located, many Windows servers use "domains" to manage authentication.

* <USERNAME> VPN username (domain username)

* <PASSWORD> The user password on the VPN, or without this parameter, the command will be automatically asked later, so as to ensure account security

* --Encrypt means enable encryption, no need to specify the encryption method, the command will read the encryption method in the configuration file

* When the following error appears when you are not using –encrypt connection, it means that encryption is used. You can also contact the VPN administrator to confirm it. You can add this parameter in the following cases.

* CHAP authentication succeeded

* LCP terminated by peer (ZM-76-^ @ <M-Mt ^ @ ^ @ ^ BM-f) Similar to garbled

* –Start Connect immediately after creating the connection.

After running this command, two configuration files were actually created:

/ etc / ppp / chap-secrets

/ etc / ppp / peers / connection name

The configuration file / etc / ppp / peers / connection name needs to be modified, mine is as follows:

# written by pptpsetup
pty "pptp 10.39.100.2 --nolaunchpppd"
lock
noauth
nobsdcomp
nodeflate
name csnj \\ administrator
remotename csvpn
ipparam csvpn
#defaultroute #Use this connection as the default route, this single network card is meaningless, you can not add it, see the appendix for instructions
persist #make pppd dial again when the connection is lost, verified
require-mppe-128
refuse-pap
refuse-chap
refuse-eap
refuse-mschap


Related Article

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.