OpenVZ的VPS开启TUNPPP教程

OpenVZ的VPS开启TUN/PPP教程

6-1 登陆VPS[https://vps.hosthatch.com/login.php],然后开启TUN和PPP,如图:

 6-1.png

6-2 完成后,我们检查下TUN和PPP。

cat /dev/net/tun    //cat: /dev/net/tun: File descriptor in bad state

cat /dev/ppp        //cat: /dev/ppp: Permission denied

6-3 悲催,PPP检测未通过,我们需要在母鸡上做相关的设定,首先,我们在后台查看到该VPS的ID,比如108.

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

6-4 完成后,重启下VPS,再次检测PPP状况。

at /dev/ppp       //cat: /dev/ppp: No such device or address

终于通过了,现在,这台VPS已经可以直接安装PPTP VPN了

我测试到第二步重启后就成功!

Leave a Reply

Your email address will not be published. Required fields are marked *