`

ubuntu 搭建 vpn server

阅读更多

安装服务端# apt-get install pptpd

设置ip地址# vi /etc/pptpd.conf 去掉相关注释

localip 192.168.0.1
remoteip 192.168.0.234-238,192.168.0.245

增加用户# vi /etc/ppp/chap-secrets

user1 pptpd password *  #最后的*表示允许任意ip连接

设置dns解析支持:# vi /etc/ppp/options

ms-dns 8.8.8.8

打开转发:# vi /etc/sysctl.conf

net.ipv4.ip_forward=1

检查/dev/ppp设备是否存在,不存在则执行:mknod /dev/ppp c 108 0

重启pptpd服务:# /etc/init.d/pptpd restart

激活转发参数: sysctl -p

配置iptables:iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

 

 

link:

http://www.satwe.com/archives/999.html

http://www.51testing.com/?uid-214454-action-viewspace-itemid-207677

http://citycatcher.info/?p=39

http://hi.baidu.com/51cmdshell/blog/item/e2370113089e75c5c3fd78f3.html

http://publish.it168.com/2006/0119/20060119109101.shtml

http://www.chinaunix.net/jh/50/371743.html

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics