最近在學習linux下搭建×××服務方面的知識,在原理及操作方面有必要總結一下;經研究發現Server端容易實現,linux下的client端配置起來較複雜,不過還好,終於發現了一個解決辦法!
一、構建基於PPTP技術Linux ×××,原理方面的介紹,有人已經總結的很“精華”,參考
http://hi.baidu.com/bfbxiaopeng/blog/item/4d9688f64f8acb65ddc4749e.html
二、服務端(PPTPD)的簡單配置
Poptop - The PPTP Server for Linux
http://poptop.sourceforge.net/dox/
如上地址爲Poptop官方的地址,可到那裏尋找最新的安裝包和安裝配置說明
安裝pptpd(CentOS release 5.5,64bit)
wget http://poptop.sourceforge.net/yum/stable/rhel5Client/pptp-release-current.noarch.rpm |
配置說明(Red Hat pptpd HOWTO)
http://poptop.sourceforge.net/dox/redhat-howto.phtml
1.檢查kernel是否支持MPPE
modprobe ppp-compress-18 && echo ok |
2.升級PPP到2.4.3或更高版本
yum --enablerepo=pptp-stable -y install ppp ppp-devel |
3.安裝pptpd
yum --enablerepo=pptp-stable -y install pptpd |
4.配置如下文件,點擊超鏈接查看配置示例
- /etc/modules.conf (only on Red Hat distributions released before 2001)
- /etc/pptpd.conf (especially the localip and remoteip tags, see the ROUTING CHECKLISTS in man pptpd.conf for more details)
- /etc/ppp/options.pptpd (especially ensure the MPPE options match your PPP version),
- /etc/ppp/chap-secrets (add a username and password for a client to log in with),
5.啓動服務
service pptpd start
三、客戶端的配置 yum --enablerepo=pptp-stable -y install pptpconfig
http://pptpclient.sourceforge.net/howto-fedora-core-6.phtml
pptpconfig&
route add -net 192.168.12.0 netmask 255.255.255.0 dev ppp0
我加了一條路由在服務器中,可根據自己的環境添加,“Routing HOWTO”請參考如下鏈接
http://pptpclient.sourceforge.net/routing.phtml
Diagnosis HOWTO
http://pptpclient.sourceforge.net/howto-diagnosis.phtml