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