Warning: Undefined array key "cperpage" in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 255

Warning: Undefined variable $output in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 325

Warning: Undefined variable $fixed_tags in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 326

Warning: Undefined variable $isshowdots in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 327

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 330

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 333

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 336

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Undefined variable $more_text_link in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345
Ubuntu14.04 安装pptp服务 – 理想社会

Ubuntu14.04 安装pptp服务

apt-get install pptpd

vim /etc/pptpd.conf
localip 11.22.33.44  #这个就是你当前主机的IP地址
remoteip 10.0.0.2-100  #这个就是给客户端分配置的IP地址池

vim /etc/ppp/options
ms-dns 8.8.8.8
ms-dns 8.8.4.4

vim chap-secrets

username   pptp    password  *

对应的分别是用户名:pptp应用名:密码:可连接的ip(默认为*)

vim /etc/sysctl.conf
net.ipv4.ip_forward = 1 #修改内核设置,使其支持转发,然后保存文件
sysctl –p #马上生效

iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE #不加这条只能访问内网资源,加了可访问外网

/etc/init.d/pptpd restart #重启应用

评论

发表回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据