CENTOS6 安裝配置 pptpd 心得

1.你所需要的軟件 
pppd    ppp撥號服務器
pptpd   在pppd撥號的基礎上增加pptpd的支持

2.安裝ppp、pptpd
加入yum源:

rpm -Uvh http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm

yum install ppp pptpd -y
 

3.配置你的pppd和pptpd

/etc/pptpd.conf中需要配置的地方有3個
3.1 配置/etc/pptpd.conf

localip 192.168.1.1
remoteip 192.168.1.11-30

3.2 配置/etc/ppp/options.pptpd

ms-dns 8.8.8.8 
ms-dns 8.8.4.4

3.3 編輯 /etc/ppp/chap-secrets添加一個測試用戶

# Secrets for authentication using CHAP
# client     server   secret      IP addresses
    test      pptpd    test           *

第一個test是用戶,第二個test是密碼 ,*表示任意ip

 

4.配置文件/etc/sysctl.conf

修改以下內容開啓ip轉發:

net.ipv4.ip_forward = 1

保存、退出後執行:

sysctl -p

 

5.打開防火牆端口

將Linux服務器的1723端口和47端口打開,並打開GRE協議。

iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
iptables -A POSTROUTING -t nat -s 192.168.1.0/24 -o eth0 -j MASQUERADE


8.測試pptpd


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章