PPTP VPN hat das Passwort nicht überprüft

PPTP VPN hat das Passwort nicht überprüft

Ich habe mithilfe dieses Skripts erfolgreich ein PPTP-VPN in meinem Linode installiert:

https://github.com/liaohuqiu/centos-setup/blob/master/install/install_vpn.sh

yum install -y ppp

wget http://centos-files.liaohuqiu.net/f/pptpd-1.3.4-2.el6.x86_64.rpm
rpm -ihv pptpd-1.3.4-2.el6.x86_64.rpm
rm -rf *.rpm

rm -rf /etc/pptpd.conf
rm -rf /etc/ppp
mkdir -p /etc/ppp

echo "option /etc/ppp/options.pptpd" >> /etc/pptpd.conf
echo "localip 10.0.0.1" >> /etc/pptpd.conf
echo "remoteip 10.0.0.10-100" >> /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

pass=`openssl rand 6 -base64`
if [ "$1" != "" ]
then pass=$1
fi
echo "vpn pptpd ${pass} *" >> /etc/ppp/chap-secrets

function config_iptables()
{
    # Reset/Flush iptables
    iptables -F
    iptables -X
    iptables -t nat -F
    iptables -t nat -X
    iptables -t mangle -F
    iptables -t mangle -X
    iptables -P INPUT ACCEPT
    iptables -P FORWARD ACCEPT
    iptables -P OUTPUT ACCEPT
    # Flush end

    iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


    iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
    iptables -A INPUT -i eth0 -p gre -j ACCEPT

    # Allow localhost traffic
    iptables -A INPUT -i lo   -m state --state NEW  -j ACCEPT
    iptables -A OUTPUT -o lo   -m state --state NEW  -j ACCEPT

    # Allow server and internal network to go anyway
    iptables -A INPUT  -s 10.0.0.0/24   -m state --state NEW  -j ACCEPT
    iptables -A OUTPUT  -m state --state NEW  -j ACCEPT

    # Allow ssh
    iptables -A INPUT -p tcp --dport ssh -j ACCEPT

    service iptables save
    service iptables restart
}

chkconfig pptpd on
service pptpd start
config_iptables

ip=`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
echo "===================================="
echo " VPN INSTALLATION COMPLETE"
echo "===================================="
echo " "
echo "VPN hostname/ip: ${ip}"
echo "VPN type: PPTP"
echo "VPN username: vpn"
echo "VPN password: ${pass}"
echo " "

Es funktioniert sehr gut. Aber in letzter Zeit habe ich festgestellt, dass es viele Verbindungsabbrüche gibt, die zu einem Datenverkehr auf meinem Server führen.

Es scheint, dass ich mit jedem Konto und Passwort eine Verbindung zum Server herstellen kann.

Und dies sind meine Konfigurationsdateien:

[root@mylinode ppp]# ll
total 24
-rw------- 1 root root  16 Jun 20 01:53 chap-secrets
-rw------- 1 root root 349 Oct 23  2013 eaptls-client
-rw------- 1 root root 405 Oct 23  2013 eaptls-server
-rw-r--r-- 1 root root   5 Nov 16  2009 options
-rw-r--r-- 1 root root  86 Jun 20 01:37 options.pptpd
-rw------- 1 root root  77 Nov 16  2009 pap-secrets

Und daschap-secets

[root@mylinode ppp]# cat chap-secrets
vpn pptpd 111 *

Und hier das Log von /var/log/message:

Jun 20 02:03:53 mylinode pptpd[23994]: CTRL: Client 221.218.36.184 control connection started
Jun 20 02:03:53 mylinode pptpd[23994]: CTRL: Starting call (launching pppd, opening GRE)
Jun 20 02:03:53 mylinode pppd[23995]: pppd 2.4.5 started by huqiu, uid 0
Jun 20 02:03:53 mylinode pppd[23995]: Using interface ppp0
Jun 20 02:03:53 mylinode pppd[23995]: Connect: ppp0 <--> /dev/pts/3
Jun 20 02:03:56 mylinode pppd[23995]: peer from calling number 221.218.36.184 authorized
Jun 20 02:03:57 mylinode pppd[23995]: local  IP address 10.0.0.1
Jun 20 02:03:57 mylinode pppd[23995]: remote IP address 10.0.0.10

Ich habe viele Male versucht, es neu zu installieren, das Problem besteht immer noch.

Jede Hilfe ist willkommen. Bei Bedarf kann ich weitere Informationen bereitstellen. Vielen Dank im Voraus.

Antwort1

Sieht aus, als hätten Sie ein schwaches Passwort, das geknackt wurde. Der Mann postet Ihre IP-Adresse und Ihr Passwort irgendwo und macht Ihren VPN-Server so zu einem öffentlichen Server. Bitte benennen Sie Ihren Benutzernamen und Ihr Passwort um.

Antwort2

Sie können den Inhalt von/etc/ppp/chap-secrets. Dort sind der Benutzername und das Passwort gespeichert, mit denen eine Verbindung zum VPN-Server hergestellt werden kann. Der Inhalt der Datei sollte folgendermaßen aussehen:

$ cat /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
username1 pptpd password1 *
username2 pptpd password2 *

Antwort3

Danke@Jarett

Ich habe dies hinzugefügt zu /etc/ppp/options.pptpd:

refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128

/etc/ppp/chap-secretsDann sollte ich das Konto und das Passwort zum Anmelden verwenden .


Der Grund

Ich habe vergessen, den Inhalt zu erwähnen /etc/ppp/options.pptpd, es waren:

name pptpd

ms-dns 8.8.8.8
ms-dns 8.8.4.4

Dann habe ich mit der folgenden Verschlüsselungsstufe eine Verbindung zum Server hergestellt None:

verwandte Informationen