echo''
echo'**********************************************************'
echo'*******PPTPD×××servicewasinstalled*******'
echo'*******http://shell.daobidao.com*******'
echo'**********************************************************'
echo''
yum-yinstallyum-fastestmirror
yum-yinstalliptablesgcc-ctarrpmperlppp
if[`getconfWORD_BIT`='32']&&[`getconfLONG_BIT`='64'];then
wget-chttp://code-jinchengjiang.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.x86_64.rpm
rpm-ivhpptpd-1.3.4-1.rhel5.1.x86_64.rpm
else
wget-chttp://code-jinchengjiang.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm
rpm-ivhpptpd-1.3.4-1.rhel5.1.i386.rpm
fi
sed-i's/#ms-dns10.0.0.1/ms-dns208.67.222.222/'/etc/ppp/options.pptpd
sed-i's/#ms-dns10.0.0.2/ms-dns8.8.8.8/'/etc/ppp/options.pptpd
sed-i's/#localip192.168.0.1/localip192.168.0.1/'/etc/pptpd.conf
sed-i's/#remoteip192.168.0.234-238,192.168.0.245/remoteip192.168.0.2-200/'/etc/pptpd.conf
sed-i's/net.ipv4.ip_forward=0/net.ipv4.ip_forward=1/'/etc/sysctl.conf
/sbin/sysctl-p
#setvpnuser
user="vpn"
echo"Pleaseinputuser:"
read-p"(Defaultuser:vpn):"user
if["$user"=""];then
user="vpn"
fi
echo"==========================="
echouser="$user"
echo"==========================="
#setvpnuserpass
pass="vpn"
echo"Pleaseinputuserpass:"
read-p"(Defaultpass:vpn):"pass
if["$pass"=""];then
pass="vpn"
fi
echo"==========================="
echopass="$pass"
echo"==========================="
echo-e"$userpptpd$pass*">>/etc/ppp/chap-secrets
serviceiptablesstart
iptables-AINPUT-ptcp--dport1723-jACCEPT
iptables-tnat-APOSTROUTING-s192.168.0.0/24-oeth1-jMASQUERADE
serviceiptablessave
serviceiptablesrestart
servicepptpdstart
chkconfigiptableson
chkconfigpptpdon
centos安装pptp搭建vpn脚本
精选 转载![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
IPSEC vpn详解
IPSEC VPN
ci Standard Time -
Centos 6.4下搭建pptp!
vpn pptp centos
vpn pptp Centos 6.4 -
CentOS 7 安装 PPTP
(4)取消勾选 "在远程网络上使用默认网关",如果你想连上VPN后本机显示的是远端的IP地址,就勾选上。10、本例是在阿里云上面
centos linux 运维 IP VPN