Many friends have bought foreign VPS, and setting up V*P*N for their own use is one of the uses. If it is a XEN or KVM architecture, this problem is not a problem, but OpenVZ needs TUN and PPP support, so it needs to be enabled by the host provider.
At the beginning of this article, I specifically stated that I used the stupidest method. I know that some hosting providers have their OpenVZ enabled by default. TUN/PPP is more representative. Such as BuyVM.net; In addition, some hosting providers' SolusVM can also turn on and set up V*P*N by clicking the TUN and PPP switches in the background. However, after trying it with VPS, V*P can be opened directly in the SolusVM background. *N still doesn’t work, so I wrote this article: In addition to opening it in SolusVM, you also need to set it up on the hen. Although this method is more tangled, it solves the problem after all. I hope it will be helpful to other friends.
Here I will first open a chick for myself to test, log in to SolusVM, create a VPS, then we can log in to this VPS from the client and enable TUN and PPP. Of course, we can also directly open this VPS as an administrator. The operation is started, as shown in the figure:
After completion, we check TUN and PPP.
[[email protected] ~]# cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state
[[email protected] ~]# cat /dev/ppp
cat: /dev/ppp: Permission denied
Sadly, the PPP test failed. We need to make relevant settings on the hen. First, we check the ID of the VPS in the background, such as 108.
1 2 3 4 5 |
vzctl set 108 --devnodes net/tun:rw --save vzctl set 108 --devices c:10:200:rw --save vzctl set 108 --capability net_admin:on --save vzctl exec 108 mkdir -p /dev/net vzctl exec 108 chmod 600 /dev/net/tun |
After completion, restart the VPS and check the PPP status again.
[[email protected] ~]# cat /dev/ppp
cat: /dev/ppp: No such device or address
It finally passed. Now, this VPS can directly install PPTP V*P*N. For the tutorial on installing OpenVZ, you can refer to this article: Click to go directly to
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["mshare","kaixin001","tsina"," tsohu","tqq","renren","qzone","weixin","bdysc","bdxc","tqf","tieba","douban","bdhome","sqq","thx" ],"bdPic":"","bdStyle":"0","bdSize":"24"},"slide":{"type":"slide","bdImg":"2","bdPos" :"left","bdTop":"100"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["tsina","tqq","tsohu","qzone","renren", "weixin","mshare"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg .share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];