1.下載套件
cd /usr/local/src/
wget http://poptop.sourceforge.net/yum/stable/packages/ppp-2.4.4-7.0.rhel5.i386.rpm
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm
wget http://poptop.sourceforge.net/yum/stable/packages/ppp-2.4.4-7.0.rhel5.i386.rpm
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm
2.安裝套件
rpm -Uvh ppp-2.4.4-7.0.rhel5.i386.rpm
rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm
rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm
3.設定pptpd
vim /etc/pptpd.conf
localip 192.168.1.254(伺服器的IP)
remoteip 192.168.1.100-200(VPN用戶的IP)
remoteip 192.168.1.100-200(VPN用戶的IP)
4.設定帳號
vim /etc/ppp/chap-secrets
UserID pptpd passwd *(或指定IP)
5.設定iptables
vim /etc/iptables.rule
echo 1 >/proc/sys/net/ipv4/ip_forward
/sbin/iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
/sbin/iptables -A INPUT -p gre -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
/sbin/iptables -A INPUT -p gre -j ACCEPT
6.啟動服務
chkconfig pptpd on
service pptpd start
service pptpd start
◎如要使用加密,而未內建MPPE時可自行安裝
1.下載MPPE
wget http://poptop.sourceforge.net/yum/stable/packages/dkms-2.0.17.5-1.noarch.rpm
wget http://poptop.sourceforge.net/yum/stable/packages/kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
wget http://poptop.sourceforge.net/yum/stable/packages/kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
2.安裝MPPE
rpm -ivh dkms-2.0.17.5-1.noarch.rpm
rpm -ivh kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
rpm -ivh kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
3.設定MPPE
vim /etc/ppp/options.pptpd
require-mppe-128
0 意見:
張貼留言