In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to install PPTP in CentOS system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
This article is suitable for VPS that can activate TUN and PPP, only Xen and OpenVZ,OpenVZ. If you use the SolusVM control panel, you can open it yourself in the background. By the way, my operating system is CentOS6.4 32 bit.
1. Confirm the activation of TUN and PPP
Xen users, please ignore this step!
The code is as follows:
Cat / dev/ppp
The output is: cat: / dev/ppp: No such device or address
The code is as follows:
Cat / dev/net/tun
The output is: cat: / dev/net/tun: File descriptor in bad state
If the output of these two items is different from what I have given, but as long as it is not "Permission denied", it will be fine, otherwise it must not be installed.
Second, install PPP,PPTP
It is recommended that you uninstall your own PPP first.
The code is as follows:
Yum remove ppp
Install libpcap
The code is as follows:
Yum-y install libpcap
Install ppp-2.4.5-5
The code is as follows:
Rpm-ivh https://lccss.googlecode.com/files/ppp-2.4.5-5.el6.i686.rpm
Or
The code is as follows:
Yum-y install ppp
Install pptpd-1.3.4-2
The code is as follows:
Rpm-ivh http://lccss.googlecode.com/files/pptpd-1.3.4-1.el6.nux.i686.rpm
Update, if it is CentOS6, you can use yum installation directly to save the trouble above. The default yum does not have pptp, so upgrade the source first:
The code is as follows:
Rpm-Uvh http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm
Then install pptpd directly (ppp and libpcap will be installed together)
The code is as follows:
Yum install pptpd
III. Various configurations
The left side of the arrow is the content that needs to be modified, and the right side of the arrow is what it should look like after modification.
The code is as follows:
Vi / etc/pptpd.conf
Get rid of #
The code is as follows:
# localip 192.168.0.1-> localip 192.168.0.1
# remoteip 192.168.0.234-238192.168.0.245-> remoteip 192.168.0.234-238192.168.0.245
Vi / etc/ppp/options.pptpd
Remove # and replace it with google's dns
The code is as follows:
# ms-dns 192.168.0.1-> ms-dns 8.8.8.8
# ms-dns 192.168.0.2-> ms-dns 8.8.4.4
Vi / etc/ppp/chap-secrets
Create a username, password and qualified IP in the format: username, ppptp password, IP address
Each field is separated by a space. If the last IP address is not qualified, use * instead, for example:
The code is as follows:
Username pptpd password *
This means that you have created a user named username with a password of password, and any IP can connect.
The code is as follows:
Vi / etc/sysctl.conf
Net.ipv4.ip_forward = 0-> net.ipv4.ip_forward = 1
Sysctl-p
Firewall forwarding is different between Xen and OpenVZ
For OpenVZ, please use:
The code is as follows:
Iptables-t nat-A POSTROUTING-s 192.168.0 VPS 24-j SNAT-- to-source your VPS IP
For Xen, please use:
The code is as follows:
Iptables-t nat-A POSTROUTING-s 192.168.8.0 eth0 24-o eth0-j MASQUERADE
Save and restart the firewall
The code is as follows:
/ etc/init.d/iptables save
/ etc/init.d/iptables restart
Turn on pptpd
The code is as follows:
Service pptpd start
OK, now you can use your computer to connect to your pptp vpn!
IV. Other minor problems
619 error, try:
The code is as follows:
Rm-r / dev/ppp
Mknod / dev/ppp c 108 0
Because I don't know much about iptables, so I used a silly method, that is, to clear all the previous firewall rules, and then use the above rules to keep restarting. Clear previous firewall rules:
The code is as follows:
Iptables-F
Iptables-X
Iptables-Z
This is the end of the content of "how to install PPTP in CentOS system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.