Bonjour à tous
Je viens demander de l'aide après 3 mois de recherche personnelle sur le sujet (assisté.com => DEHORS , c'est en faisant qu'on apprend ), je viens finir par poster mon problème.
Je loue un serveur chez Bytesized. Très satisfait de cet hébergeur, j'ai petit à petit déployé de plus en plus de services sur mon VPS, tout en assurant une anonymat de mes connections par ssh. Et maintenant POUF! le ssh, je trouve sa dépassé, je veux faire du VéPéN
J'ai donc recherché plusieurs tutoriels, fais des machines virtuelles pour tester mes configurations, et jusque là OK, tout fonctionne, je passe derrière mon VPN, et mes connections se retrouvent toutes passant par ma VM.
Je commence à tout mettre en place sur mon VPS.
Installation OK
Configuration et création certificats OK
Transferts des certificats OK (je n'ai omis aucun fichier)
Lorsque je lance mon client.ovpn, voici ce que le log client me renvoi:
MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Mon Dec 02 13:28:21 2013 Need hold release from management interface, waiting...
Mon Dec 02 13:28:21 2013 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:-----
Mon Dec 02 13:28:21 2013 MANAGEMENT: CMD 'state on'
Mon Dec 02 13:28:21 2013 MANAGEMENT: CMD 'log all on'
Mon Dec 02 13:28:21 2013 MANAGEMENT: CMD 'hold off'
Mon Dec 02 13:28:21 2013 MANAGEMENT: CMD 'hold release'
Mon Dec 02 13:28:21 2013 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
Mon Dec 02 13:28:21 2013 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Dec 02 13:28:21 2013 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Dec 02 13:28:21 2013 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Dec 02 13:28:21 2013 Attempting to establish TCP connection with [AF_INET]--.--.--.--:443
Mon Dec 02 13:28:21 2013 MANAGEMENT: >STATE:1385987301,TCP_CONNECT,,,
Mon Dec 02 13:28:21 2013 TCP connection established with [AF_INET]--.--.--.--:443
Mon Dec 02 13:28:21 2013 TCPv4_CLIENT link local: [undef]
Mon Dec 02 13:28:21 2013 TCPv4_CLIENT link remote: [AF_INET]--.--.--.--:443
Mon Dec 02 13:28:21 2013 MANAGEMENT: >STATE:1385987301,WAIT,,,
Mon Dec 02 13:28:21 2013 Connection reset, restarting [0]
Mon Dec 02 13:28:21 2013 SIGUSR1[soft,connection-reset] received, process restarting
Mon Dec 02 13:28:21 2013 MANAGEMENT: >STATE:1385987301,RECONNECTING,connection-reset,,
Mon Dec 02 13:28:21 2013 Restart pause, 5 second(s)
(Les "--" remplacent mes addresses et ports "sensibles)
Du coté de mon serveur, les logs me renvoient:
Voici mon fichier de configuration client:Mon Dec 2 12:30:29 2013 MULTI: multi_create_instance called
Mon Dec 2 12:30:29 2013 Re-using SSL/TLS context
Mon Dec 2 12:30:29 2013 LZO compression initialized
Mon Dec 2 12:30:29 2013 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ]
Mon Dec 2 12:30:29 2013 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Mon Dec 2 12:30:29 2013 Local Options hash (VER=V4): 'bb97d03b'
Mon Dec 2 12:30:29 2013 Expected Remote Options hash (VER=V4): '71d8550f'
Mon Dec 2 12:30:29 2013 TCP connection established with [AF_INET]88.168.90.3:53727
Mon Dec 2 12:30:29 2013 TCPv4_SERVER link local: [undef]
Mon Dec 2 12:30:29 2013 TCPv4_SERVER link remote: [AF_INET]88.168.90.3:53727
Mon Dec 2 12:30:29 2013 --.--.--.--:53727 TLS: Initial packet from [AF_INET]88.168.90.3:53727, sid=3ba9ff62 fbf78732
Mon Dec 2 12:30:29 2013 --.--.--.--:53727 TLS Error: cannot locate HMAC in incoming packet from [AF_INET]--.--.--.--:53727
Mon Dec 2 12:30:29 2013 --.--.--.--:53727 Fatal TLS error (check_tls_errors_co), restarting
Mon Dec 2 12:30:29 2013 --.--.--.--:53727 SIGUSR1[soft,tls-error] received, client-instance restarting
Mon Dec 2 12:30:29 2013 TCP/UDP: Closing socket
Mon fichier de configuration serveur:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 client dev tun proto tcp remote --.--.--.-- port 443 resolv-retry infinite #cipher AES-256-CBC cipher CAST5-CBC nobind redirect-gateway def1 persist-key persist-tun ns-cert-type server ca ca.crt cert PifPortable.crt key PifPortable.key tls-auth ta.key 1 comp-lzo verb 3
Pour Finir, voici le script iptables que j'ai en place sur mon VPS:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 # Serveur TCP/443 mode server proto tcp port 443 dev tun # Cles et certificats ca /etc/openvpn/ca.crt cert /etc/openvpn/server.crt key /etc/openvpn/server.key dh /etc/openvpn/dh1024.pem tls-auth /etc/openvpn/ta.key 0 #cipher AES-256-CBC cipher CAST5-CBC # Reseau server 10.8.0.0 255.255.255.0 push "redirect-gateway def1 bypass-dhcp" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" keepalive 10 120 # Securite user nobody group nogroup chroot /etc/openvpn/jail persist-key persist-tun comp-lzo # Log verb 3 mute 20 status openvpn-status.log log-append /var/log/openvpn.log
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65 # Vider les tables actuelles iptables -t filter -F iptables -t nat -F # Vider les regles personnelles iptables -t filter -X iptables -t nat -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/Out iptables -t filter -A INPUT -p tcp --dport 22 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 22 -j ACCEPT # DNS In/Out iptables -t filter -A OUTPUT -p udp --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 # HTTP(S) In/Out iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT w iptables -t filter -A OUTPUT -p tcp --dport 80 -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT # DELUGED In/Out iptables -t filter -A INPUT -p tcp --dport 56881:56889 -j ACCEPT iptables -t filter -A INPUT -p udp --dport 56881:56889 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 56881:56889 -j ACCEPT iptables -t filter -A OUTPUT -p udp --dport 56881:56889 -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 56969 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 56969 -j ACCEPT iptables -t filter -A INPUT -p udp --dport 56969 -j ACCEPT iptables -t filter -A OUTPUT -p udp --dport 56969 -j ACCEPT # DELUGE-WEB In/Out iptables -t filter -A INPUT -p tcp --dport 12000 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 12000 -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 8080 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 8080 -j ACCEPT # regle openvpn iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source --.--.--.-- iptables -t filter -A INPUT -i tun0 -j ACCEPT iptables -t filter -A OUTPUT -o tun0 -j ACCEPT
Comme dit precedemment, cela fait environ 3 mois maintenant que je suis sur cette configuration... Par defaut, je comptais utiliser mon vpn pour l'anonymisation, mais faute de, je continue en ssh actuellement. Seulement, le VPN m'apporte d'autres fonctionnalités qui seraient fortement simplifiées si mises en places dans un VPN plutot qu'en dehors.... Un peu d'aide s'il vous plait^^
Si cela peut vous faire avancer, je ne veux que le port 443, ainsi que uniquement le peripherique tun, la fonction tap etant trop bridante, et bien plus compliquée à mettre en oeuvre.
Un très grand merci à tout(es) celles/ceux qui s'attarderont sur mon problème
Partager