After getting a vps you may need to get a stable environment as soon as possible scientific,Method uses "earth move" and is a good choice (VPN)
Of course,Now we know everything Policy,GFW has now started to begin to interfere with VPN,So this is not based VPN pptp protocol of a long-term approach (which is a bit l2tp goods relative speed is faster in terms of speed)。
All right,In short,Pptp-based VPN configuration simple,Run Fast,Let's get it every minute:
1、Updating System
Standard procedures,First, use the command to update your software sources and systems
1 2 3 |
apt-get update apt-get upgrade |
2、Installing PPTP service
1 |
apt-get install pptpd |
3、Configuration Service
1 2 3 4 5 6 |
vi /etc/pptpd.conf //编辑配置文件,将下面的语句取消注释: option /etc/ppp/pptpd-options //开启配置文件 localip 192.168.0.1 remoteip 192.168.0.201-245 //这两句用于你登录VPN后获取内网地址 |
4、Configure account
1 2 3 4 5 |
vi /etc/ppp/chap-secrets //根据提示,一行一个账户,用tab或者空格分隔信息: test pptpd "password" * //第一个是用户名 第二段是服务名 第三段要用引号括起来的是密码 第四段是IP限制 //考虑到不限制IP,就使用星号代替啦 |
5、Configuring DNS resolution
1 2 3 4 5 |
vi /etc/ppp/pptpd-options //找到如下两行取消注释 ms-dns 8.8.8.8 ms-dns 8.8.4.4 //推荐你改成8.8.8.8这类公共DNS避免污染。 |
6、Open forwarding
1 2 3 4 5 6 7 8 |
vi /etc/sysctl.conf //找到并修改 net.ipv4.ip_forward=1 //保存后还要执行如下语句 echo 1 > /proc/sys/net/ipv4/ip_forward //然后给iptables添加规则开启NAT地址伪装 iptables -t nat -I POSTROUTING -j MASQUERADE |
7、Start Service
1 |
/etc/init.d/pptpd restart |
At this point,Pptp VPN service based on it has been configured,You can try to use any device to access mobile computer tablet support VPN services up!
Come,Computer test:
Original article written by LogStudio:R0uter's Blog » On Ubuntu vps and other OS's seven-step build pptp protocol VPN
Reproduced Please keep the source and description link:https://www.logcg.com/archives/886.html
Comments