Build PPTP of VPN Server and vpnpptp

Source: Internet
Author: User

Build PPTP of VPN Server and vpnpptp

First milestone: Check whether the system supports ppp

[root@m01 ~]# cat /dev/pppcat: /dev/ppp: No such device or address

If the above prompt is displayed, the ppp is enabled and the pptp service can be set up normally. If there are other prompts such as Permission denied, you need to go to the VPS panel to see if there is any enable ppp function switch.

Second milestone: Set kernel forwarding

[root@m01 ~]# grep forw /etc/sysctl.conf# Controls IP packet forwardingnet.ipv4.ip_forward = 0[root@m01 ~]# sed -i 's#net.ipv4.ip_forward = 0#net.ipv4.ip_forward = 1#g'  /etc/sysctl.conf[root@m01 ~]# grep forw /etc/sysctl.conf# Controls IP packet forwardingnet.ipv4.ip_forward = 1[root@m01 ~]# sysctl -p

Third milestone:Install pptp

[root@m01 ~]# yum -y install pptpd

Note: The installation of pptp software depends on the epel source.

Fourth milestone: Configuring pptp

[Root @ m01 ~] # Cp/etc/pptpd. conf {,. bak} # back up the configuration file before configuration [root @ m01 ~] # Tail-2/etc/pptpd. conflocalip 10.0.0.61remoteip 172.16.1.160-190

Configuration File description:

Add local public IP addresses to localip

Remoteip allocates the Intranet CIDR Block of the VPN user

Fifth milestone: vpnConnected user and password

[root@m01 ~]# tail -1  /etc/ppp/chap-secretsvpn * vpn *

Sixth milestone: Start pptpService, set to auto-start

[root@m01 ~]# /etc/init.d/pptpd startStarting pptpd:                                            [  OK  ][root@m01 ~]# chkconfig |grep pptpptpd          0:off  1:off  2:on   3:on   4:on   5:on   6:off

The seventh milestone: windwosClient Test

In windowsTest ping on the hostIntranet address

[F: \ ~] $ Ping 172.16.1.8 pinging 172.16.1.8 with 32 bytes of data: replies from 172.16.1.8: byte = 32 time = 3 ms TTL = 63 replies from 172.16.1.8: bytes = 32 time = 3 ms TTL = 63172.16.1.8 Ping statistics: Packet: Sent = 1, received = 1, lost = 0 (0% lost ), estimated round-trip time (in milliseconds): Minimum = 2 ms, maximum = 3 ms, average = 2 ms

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.