- v.p.s2014-04-18中级会员23771
- 本帖最后由 v.p.s 于 2014-4-22 16:21 编辑 *
vps是OpenVZ,Debian 7 32bit
TUN/TAP,PPP都已经打开,随便搜了个一键包来装,
- - #!/bin/bash
- - if [ $(id -u) != "0" ]; then
- printf "Error: You must be root to run this tool!\n"
- exit 1
- fi
- clear
- printf "
- ####################################################
- # #
- # This is a Shell-Based tool of pptp installation #
- # Version: 0.1 #
- # Author: Bruce Ku #
- # For Debian/Ubuntu 32bit and 64bit #
- # #
- ####################################################
- "
- vpsip=
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk 'NR==1 { print $1}' - apt-get update
- apt-get --purge remove pptpd ppp
- rm -rf /etc/pptpd.conf
- rm -rf /etc/ppp
- apt-get install -y ppp
- apt-get install -y pptpd
- apt-get install -y iptables logrotate tar cpio perl
- rm -r /dev/ppp
- mknod /dev/ppp c 108 0
- echo 1 > /proc/sys/net/ipv4/ip_forward
- echo "mknod /dev/ppp c 108 0" >> /etc/rc.local
- echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> /etc/rc.local
- echo "localip 172.16.36.1" >> /etc/pptpd.conf
- echo "remoteip 172.16.36.2-254" >> /etc/pptpd.conf
- echo "ms-dns 8.8.8.8" >> /etc/ppp/options.pptpd
- echo "ms-dns 8.8.4.4" >> /etc/ppp/options.pptpd
- echo "test test123 " >> /etc/ppp/chap-secrets
- iptables -t nat -A POSTROUTING -s 172.16.36.0/24 -j SNAT --to-source
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk 'NR==1 { print $1}' - iptables -A FORWARD -p tcp --syn -s 172.16.36.0/24 -j TCPMSS --set-mss 1356
- iptables -t nat -A POSTROUTING -s 172.16.36.0/24 -j SNAT --to-source "$vpsip"
- printf "
- ####################################################
- # #
- # This is a Shell-Based tool of pptp installation #
- # Version: 0.1 #
- # Author: Bruce Ku #
- # For Debian/Ubuntu 32bit and 64bit #
- # #
- ####################################################
- ServerIP:$vpsip
- username:test
- password:test123
- - "复制代码
装完用windows建立扶墙的拨号连接可以,但是用Bitvise SSh Client就连不上去。后来试了其他几个一键包也还是不行,一样的问题,windows建立拨号连接就可以,用Bitvise SSH Client就连不上
提示密码错误
Attempting 'password' authentication.
Authentication failed. Remaining authentication methods: 'publickey,password'.
Attempting 'password' authentication.
Authentication failed. Remaining authentication methods: 'publickey,password'.
Session terminated on user's request.请问你们知道是怎么回事吗?