Hallo,
habe auf meinem Server einen OpenVpn Server versucht einzurichten, doch egal was ich mache, ich kann mich nicht mit openvpn am Server anmelden. So hier mal meine server.conf file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | port 1194 proto tcp-server dev tun ca /etc/openvpn/keys/ca.crt cert /etc/openvpn/keys/kiefer-solutions.de.crt key /etc/openvpn/keys/kiefer-solutions.de.key # This file should be kept secret dh /etc/openvpn/keys/dh1024.pem server 192.168.50.0 255.255.255.0 ifconfig-pool-persist ipp.txt keepalive 10 120 push "route 192.168.50.0 255.255.255.0" push "dhcp-option DNS 192.168.50.1" persist-key persist-tun status openvpn-status.log log /var/log/openvpn.log log-append /var/log/openvpn.log verb 3 user nobody group nogroup #Encryption (fastest) cipher BF-CBC #This is for allow userlogin client-cert-not-required username-as-common-name auth-user-pass-verify /etc/openvpn/verify.php via-file |
Dazu habe ich die users file und die veriy file
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/usr/bin/php <? $userArray = file('/etc/openvpn/users'); $tmpFile = file($argv[1]); #userArray should be in the form of #username:password foreach ($userArray as $line) { $newArray = preg_split("/[:]+/", $line); if(trim($newArray[0]) == trim($tmpFile[0]) AND trim($newArray[1]) == trim($tmpFile[1])) exit(0); #Found a match } exit(1); #No match ?> |
user sieht halt wie folgt aus: test:test123
So die Client Config:
1 2 3 4 5 6 7 8 | client dev tun proto tcp-client remote 151.236.24.104 1194 ca /home/malte/.openvpn/keys/iceland.crt verb 3 cipher BF-CBC auth-user-pass |
Doch jedesmal wenn ich mich anmelden will.
Sun Dec 8 10:20:34 2013 [kiefer-solutions.de] Peer Connection Initiated with [AF_INET]151.236.24.104:1194 Sun Dec 8 10:20:36 2013 SENT CONTROL [kiefer-solutions.de]: 'PUSH_REQUEST' (status=1) Sun Dec 8 10:20:36 2013 AUTH: Received control message: AUTH_FAILED Sun Dec 8 10:20:36 2013 SIGTERM[soft,auth-failure] received, process exiting