Partage
  • Partager sur Facebook
  • Partager sur Twitter

Probleme de connexion OpenVPN

    31 décembre 2014 à 14:19:48

    Bonjour,

    J'ai loué un serveur KS2 chez Kimsufi. Je suis à l'étranger et pour avoir une connexion "française" je passais par une connexion ssh.

    Seulement je voudrais le faire aussi pour mon smartphone et tablette sous Android mais le root n'est pas possible.

    Du coup j'ai installé et configuré openvpn avec le tuto du sdz http://openclassrooms.com/courses/creer-son-propre-serveur-vpn-avec-open-vpn

    Je ne suis pas du tout expert la dessus et je ne suis pas pas capable de voir et comprendre d'où vient l'erreur...

    Merci d'avance pour votre aide :)

    Mon iptable

    #!/bin/sh
    
    function iptables_v4_v6 {
      iptables "$@"
      ip6tables "$@"
    }
    
    #Vider les tables actuelles
    iptables -t filter -F
    
    # Vider les règles personnelles
    iptables -t filter -X
    
    # Interdire toute connexion entrante et sortante
    iptables -t filter -P INPUT DROP
    iptables -t filter -P FORWARD DROP
    iptables -t filter -P OUTPUT DROP
    
    # ---
    
    # Ne pas casser les connexions etablies
    iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    
    # Autoriser loopback
    iptables -t filter -A INPUT -i lo -j ACCEPT
    iptables -t filter -A OUTPUT -o lo -j ACCEPT
    
    # ICMP (Ping)
    iptables -t filter -A INPUT -p icmp -j ACCEPT
    iptables -t filter -A OUTPUT -p icmp -j ACCEPT
    
    # ---
    
    # SSH In
    iptables -t filter -A INPUT -p tcp --dport 2222 -j ACCEPT
    
    # SSH Out
    iptables -t filter -A OUTPUT -p tcp --dport 2222 -j ACCEPT
    
    # DNS In/Out
    iptables -t filter -A OUTPUT -p tcp --dport 53 -j ACCEPT
    iptables -t filter -A OUTPUT -p udp --dport 53 -j ACCEPT
    iptables -t filter -A INPUT -p tcp --dport 53 -j ACCEPT
    iptables -t filter -A INPUT -p udp --dport 53 -j ACCEPT
    
    # NTP Out
    iptables -t filter -A OUTPUT -p udp --dport 123 -j ACCEPT
    
    # Autorisation de tout le traffic sur l'interface loopback
    iptables_v4_v6 -t filter -A INPUT -i lo -j ACCEPT
    iptables_v4_v6 -t filter -A OUTPUT -o lo -j ACCEPT
    
    # Autorisation du HTTP/HTTPS entrant et sortant
    iptables_v4_v6 -t filter -A INPUT -p tcp --dport http -j ACCEPT
    iptables_v4_v6 -t filter -A OUTPUT -p tcp --dport http -j ACCEPT
    iptables_v4_v6 -t filter -A INPUT -p tcp --dport https -j ACCEPT
    iptables_v4_v6 -t filter -A OUTPUT -p tcp --dport https -j ACCEPT
    
    # Autorisation du FTP entrant et sortant
    iptables_v4_v6 -t filter -A INPUT -p tcp --dport ftp-data -j ACCEPT
    iptables_v4_v6 -t filter -A OUTPUT -p tcp --dport ftp-data -j ACCEPT
    iptables_v4_v6 -t filter -A INPUT -p tcp --dport ftp -j ACCEPT
    iptables_v4_v6 -t filter -A OUTPUT -p tcp --dport ftp -j ACCEPT
    
    # VPN
    iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE



    Et le log d'openvpn

    Wed Dec 31 14:17:28 2014 OpenVPN 2.3.6 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Dec  1 2014
    Wed Dec 31 14:17:28 2014 library versions: OpenSSL 1.0.1j 15 Oct 2014, LZO 2.08
    Enter Management Password:
    Wed Dec 31 14:17:28 2014 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
    Wed Dec 31 14:17:28 2014 Need hold release from management interface, waiting...
    Wed Dec 31 14:17:29 2014 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
    Wed Dec 31 14:17:29 2014 MANAGEMENT: CMD 'state on'
    Wed Dec 31 14:17:29 2014 MANAGEMENT: CMD 'log all on'
    Wed Dec 31 14:17:29 2014 MANAGEMENT: CMD 'hold off'
    Wed Dec 31 14:17:29 2014 MANAGEMENT: CMD 'hold release'
    Wed Dec 31 14:17:29 2014 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
    Wed Dec 31 14:17:29 2014 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
    Wed Dec 31 14:17:29 2014 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
    Wed Dec 31 14:17:29 2014 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
    Wed Dec 31 14:17:29 2014 Socket Buffers: R=[65536->65536] S=[65536->65536]
    Wed Dec 31 14:17:29 2014 Attempting to establish TCP connection with [AF_INET]37.187.126.25:443 [nonblock]
    Wed Dec 31 14:17:29 2014 MANAGEMENT: >STATE:1420031849,TCP_CONNECT,,,
    Wed Dec 31 14:17:30 2014 TCP connection established with [AF_INET]37.187.126.25:443
    Wed Dec 31 14:17:30 2014 TCPv4_CLIENT link local: [undef]
    Wed Dec 31 14:17:30 2014 TCPv4_CLIENT link remote: [AF_INET]37.187.126.25:443
    Wed Dec 31 14:17:30 2014 MANAGEMENT: >STATE:1420031850,WAIT,,,
    Wed Dec 31 14:17:30 2014 MANAGEMENT: >STATE:1420031850,AUTH,,,
    Wed Dec 31 14:17:30 2014 TLS: Initial packet from [AF_INET]37.187.126.25:443, sid=81e1cbc7 e7720564
    Wed Dec 31 14:17:31 2014 VERIFY OK: depth=1, C=FR, ST=FR, L=Roubaix, O=Pouet, OU=changeme, CN=changeme, name=changeme, emailAddress=mail@pouet.fr
    Wed Dec 31 14:17:31 2014 VERIFY OK: depth=0, C=FR, ST=FR, L=Roubaix, O=Pouet, OU=changeme, CN=changeme, name=changeme, emailAddress=mail@pouet.fr
    Wed Dec 31 14:17:31 2014 Connection reset, restarting [0]
    Wed Dec 31 14:17:31 2014 SIGUSR1[soft,connection-reset] received, process restarting
    Wed Dec 31 14:17:31 2014 MANAGEMENT: >STATE:1420031851,RECONNECTING,connection-reset,,
    Wed Dec 31 14:17:31 2014 Restart pause, 5 second(s)
    Wed Dec 31 14:17:36 2014 SIGTERM[hard,init_instance] received, process exiting
    Wed Dec 31 14:17:36 2014 MANAGEMENT: >STATE:1420031856,EXITING,init_instance,,


     




    -
    Edité par ElTeror 31 décembre 2014 à 14:21:56

    • Partager sur Facebook
    • Partager sur Twitter

    Probleme de connexion OpenVPN

    × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
    × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
    • Editeur
    • Markdown