Herod2k
13-06-2012, 03:45
Salve a tutti,
ho un problema con OpenVPN, il cliente e il server si vedono pero i clients non navigano su internet attraverso il server. Vado per punti.
Questo è il mio scopo:
ho un computer server (debian 6) in una server farm e due computer clients uno archlinux e l'altro windows 7, vorrei connettere i 3 (e piu computer piu avanti) tutti al server debian e far navigare tutti i computer utilizzando la connessione del server.
Fin qui tutto normale, secondo le guide che ho letto dovrebbe essere semplicissimo.
Il mio problema:
Ho installato OpenVPN sul server con certificato TLS ho installato OpenVPN sui i client ho generato i certificati dei clients, ho aperto le porte del server, lancio openvpn sia sul server che sui clients, si connettono, si vedono pero i clients non navigano.
Ovvero se il server diventa 10.8.0.1 e gli altri sono 10.8.0.2 e .3 tutti e 3 si pingano, posso anche entrare in ssh dal .2 al .1 senza problemi quindi ho creato la vpn pero i clients non navigano, se pingo il server risponde, se pingo google no.
I files di configurazione:
server.conf
local xxx.xxx.xxx.xxx
port 1193
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 10.8.0.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
tls-auth ta.key 0
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
client.conf (sia su linux che su windows sono uguali cambia solo i certificato praticamente)
client
dev tun
proto udp
remote xxx.xxx.xxx.xxx 1193
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert cyberjandry.crt
key cyberjandry.key
ns-cert-type server
tls-auth ta.key 1
comp-lzo
verb 3
Mi sono anche assicurato che ip_forward fosse a uno con:
echo 1 > /proc/sys/net/ipv4/ip_forward
e ho configurato il firwall cosi:
iptables -A INPUT -p udp --dport 1193 -s 10.8.0.0/24 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
I logs:
log del server:
Wed Jun 13 03:21:48 2012 OpenVPN 2.1.3 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Feb 21 2012
Wed Jun 13 03:21:48 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Jun 13 03:21:48 2012 Diffie-Hellman initialized with 2048 bit key
Wed Jun 13 03:21:48 2012 /usr/bin/openssl-vulnkey -q -b 2048 -m <modulus omitted>
Wed Jun 13 03:21:48 2012 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
Wed Jun 13 03:21:48 2012 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:21:48 2012 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:21:48 2012 TLS-Auth MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 03:21:48 2012 Socket Buffers: R=[124928->131072] S=[124928->131072]
Wed Jun 13 03:21:48 2012 ROUTE default_gateway=91.121.208.254
Wed Jun 13 03:21:48 2012 TUN/TAP device tun0 opened
Wed Jun 13 03:21:48 2012 TUN/TAP TX queue length set to 100
Wed Jun 13 03:21:48 2012 /sbin/ifconfig tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Wed Jun 13 03:21:48 2012 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Wed Jun 13 03:21:49 2012 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 03:21:49 2012 GID set to nogroup
Wed Jun 13 03:21:49 2012 UID set to nobody
Wed Jun 13 03:21:49 2012 UDPv4 link local (bound): [AF_INET]xxx.xxx.xxx.xxx:1193
Wed Jun 13 03:21:49 2012 UDPv4 link remote: [undef]
Wed Jun 13 03:21:49 2012 MULTI: multi_init called, r=256 v=256
Wed Jun 13 03:21:49 2012 IFCONFIG POOL: base=10.8.0.4 size=62
Wed Jun 13 03:21:49 2012 IFCONFIG POOL LIST
Wed Jun 13 03:21:49 2012 cyberjandry,10.8.0.4
Wed Jun 13 03:21:49 2012 hades,10.8.0.8
Wed Jun 13 03:21:49 2012 Initialization Sequence Completed
Wed Jun 13 03:22:58 2012 MULTI: multi_create_instance called
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Re-using SSL/TLS context
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 LZO compression initialized
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Local Options hash (VER=V4): '14168603'
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Expected Remote Options hash (VER=V4): '504e774e'
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 TLS: Initial packet from [AF_INET]58.35.172.192:6947, sid=527db04a 3a6a334c
Wed Jun 13 03:23:45 2012 58.35.172.192:6947 VERIFY OK: depth=1, /C=IT/ST=Roma/L=Roma/O=esempio/CN=esempio_CA/emailAddress=nobody@example.com
Wed Jun 13 03:23:45 2012 58.35.172.192:6947 VERIFY OK: depth=0, /C=IT/ST=Roma/L=Roma/O=esempio/CN=cyberjandry/emailAddress=nobody@example.com
Wed Jun 13 03:23:58 2012 58.35.172.192:6947 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Jun 13 03:23:58 2012 58.35.172.192:6947 TLS Error: TLS handshake failed
Wed Jun 13 03:23:58 2012 58.35.172.192:6947 SIGUSR1[soft,tls-error] received, client-instance restarting
Wed Jun 13 03:24:00 2012 MULTI: multi_create_instance called
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Re-using SSL/TLS context
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 LZO compression initialized
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Local Options hash (VER=V4): '14168603'
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Expected Remote Options hash (VER=V4): '504e774e'
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 TLS: Initial packet from [AF_INET]58.35.172.192:6970, sid=fa8f04a1 e05ed8f1
Wed Jun 13 03:24:18 2012 58.35.172.192:6970 VERIFY OK: depth=1, /C=IT/ST=Roma/L=Roma/O=esempio/CN=esempio_CA/emailAddress=nobody@example.com
Wed Jun 13 03:24:18 2012 58.35.172.192:6970 VERIFY OK: depth=0, /C=IT/ST=Roma/L=Roma/O=esempio/CN=cyberjandry/emailAddress=nobody@example.com
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 [cyberjandry] Peer Connection Initiated with [AF_INET]58.35.172.192:6970
Wed Jun 13 03:24:28 2012 cyberjandry/58.35.172.192:6970 MULTI: Learn: 10.8.0.6 -> cyberjandry/58.35.172.192:6970
Wed Jun 13 03:24:28 2012 cyberjandry/58.35.172.192:6970 MULTI: primary virtual IP for cyberjandry/58.35.172.192:6970: 10.8.0.6
Wed Jun 13 03:24:39 2012 cyberjandry/58.35.172.192:6970 PUSH: Received control message: 'PUSH_REQUEST'
Wed Jun 13 03:24:39 2012 cyberjandry/58.35.172.192:6970 SENT CONTROL [cyberjandry]: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
Wed Jun 13 03:24:44 2012 cyberjandry/58.35.172.192:6970 PUSH: Received control message: 'PUSH_REQUEST'
Wed Jun 13 03:24:44 2012 cyberjandry/58.35.172.192:6970 SENT CONTROL [cyberjandry]: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
Log client Archlinux
Wed Jun 13 09:30:44 2012 OpenVPN 2.2.2 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] [eurephia] built on Jan 3 2012
Wed Jun 13 09:30:44 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Jun 13 09:30:44 2012 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
Wed Jun 13 09:30:44 2012 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:30:44 2012 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:30:44 2012 LZO compression initialized
Wed Jun 13 09:30:44 2012 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 09:30:44 2012 Socket Buffers: R=[163840->131072] S=[163840->131072]
Wed Jun 13 09:30:44 2012 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 09:30:44 2012 Local Options hash (VER=V4): '504e774e'
Wed Jun 13 09:30:44 2012 Expected Remote Options hash (VER=V4): '14168603'
Wed Jun 13 09:30:44 2012 UDPv4 link local: [undef]
Wed Jun 13 09:30:44 2012 UDPv4 link remote: xxx.xxx.xxx.xxx:1193
Wed Jun 13 09:30:45 2012 TLS: Initial packet from xxx.xxx.xxx.xxx:1193, sid=f9bf27ab 693e1eaf
Wed Jun 13 09:30:47 2012 VERIFY OK: depth=1, /C=IT/ST=Roma/L=Roma/O=esempio/CN=esempio_CA/emailAddress=nobody@example.com
Wed Jun 13 09:30:47 2012 VERIFY OK: nsCertType=SERVER
Wed Jun 13 09:30:47 2012 VERIFY OK: depth=0, /C=IT/ST=Roma/L=Roma/O=esempio/CN=server/emailAddress=nobody@example.com
Wed Jun 13 09:31:03 2012 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 09:31:03 2012 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:31:03 2012 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 09:31:03 2012 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:31:06 2012 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Jun 13 09:31:06 2012 [server] Peer Connection Initiated with xxx.xxx.xxx.xxx:1193
Wed Jun 13 09:31:09 2012 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Wed Jun 13 09:31:09 2012 PUSH: Received control message: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: timers and/or timeouts modified
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: --ifconfig/up options modified
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: route options modified
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Jun 13 09:31:09 2012 ROUTE default_gateway=192.168.2.1
Wed Jun 13 09:31:09 2012 TUN/TAP device tun0 opened
Wed Jun 13 09:31:09 2012 TUN/TAP TX queue length set to 100
Wed Jun 13 09:31:09 2012 /usr/sbin/ip link set dev tun0 up mtu 1500
Wed Jun 13 09:31:09 2012 /usr/sbin/ip addr add dev tun0 local 10.8.0.6 peer 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add xxx.xxx.xxx.xxx/32 via 192.168.2.1
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 0.0.0.0/1 via 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 128.0.0.0/1 via 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 10.8.0.0/24 via 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 10.8.0.1/32 via 10.8.0.5
Wed Jun 13 09:31:09 2012 Initialization Sequence Completed
ifconfig server:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:186 errors:0 dropped:0 overruns:0 frame:0
TX packets:121 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12247 (11.9 KiB) TX bytes:10807 (10.5 KiB)
ifconfig client:
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 metric 1
inet 10.8.0.6 netmask 255.255.255.255 destination 10.8.0.5
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 9 bytes 864 (864.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29 bytes 2061 (2.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Ping dal client una volta connesso alla vpn:
PING www-cctld.l.google.com (74.125.71.94) 56(84) bytes of data.
From 10.8.0.1 icmp_seq=2 Destination Port Unreachable
From 10.8.0.1 icmp_seq=4 Destination Port Unreachable
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.1: icmp_req=4 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=5 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=6 ttl=64 time=394 ms
64 bytes from 10.8.0.1: icmp_req=7 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=8 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=9 ttl=64 time=393 ms
Le prove che ho fatto:
Tante, troppe, sono 3 giorni che faccio solo questo, cmq posso dire che
- ho disabilitato il firewall sulla macchina, per vedere se era un problema di iptables,
- ho provato il protocollo tcp al posto di udp
- ho provato la stessa configurazione del server su un'altro server debian pulito pulito, ma con lo stesso risultato.
- ho provato svariate regole di iptables
- ho provato ad usare tap e non tun
- ho provato a mettere l'ip fisso come in questa guida: http://guide.debianizzati.org/index.php/Openvpn
Insomma sono a corto di idee, se ne avete qualcuna voi, benvenga.
Grazie mille
H2K
ho un problema con OpenVPN, il cliente e il server si vedono pero i clients non navigano su internet attraverso il server. Vado per punti.
Questo è il mio scopo:
ho un computer server (debian 6) in una server farm e due computer clients uno archlinux e l'altro windows 7, vorrei connettere i 3 (e piu computer piu avanti) tutti al server debian e far navigare tutti i computer utilizzando la connessione del server.
Fin qui tutto normale, secondo le guide che ho letto dovrebbe essere semplicissimo.
Il mio problema:
Ho installato OpenVPN sul server con certificato TLS ho installato OpenVPN sui i client ho generato i certificati dei clients, ho aperto le porte del server, lancio openvpn sia sul server che sui clients, si connettono, si vedono pero i clients non navigano.
Ovvero se il server diventa 10.8.0.1 e gli altri sono 10.8.0.2 e .3 tutti e 3 si pingano, posso anche entrare in ssh dal .2 al .1 senza problemi quindi ho creato la vpn pero i clients non navigano, se pingo il server risponde, se pingo google no.
I files di configurazione:
server.conf
local xxx.xxx.xxx.xxx
port 1193
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 10.8.0.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
tls-auth ta.key 0
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
client.conf (sia su linux che su windows sono uguali cambia solo i certificato praticamente)
client
dev tun
proto udp
remote xxx.xxx.xxx.xxx 1193
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert cyberjandry.crt
key cyberjandry.key
ns-cert-type server
tls-auth ta.key 1
comp-lzo
verb 3
Mi sono anche assicurato che ip_forward fosse a uno con:
echo 1 > /proc/sys/net/ipv4/ip_forward
e ho configurato il firwall cosi:
iptables -A INPUT -p udp --dport 1193 -s 10.8.0.0/24 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
I logs:
log del server:
Wed Jun 13 03:21:48 2012 OpenVPN 2.1.3 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Feb 21 2012
Wed Jun 13 03:21:48 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Jun 13 03:21:48 2012 Diffie-Hellman initialized with 2048 bit key
Wed Jun 13 03:21:48 2012 /usr/bin/openssl-vulnkey -q -b 2048 -m <modulus omitted>
Wed Jun 13 03:21:48 2012 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
Wed Jun 13 03:21:48 2012 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:21:48 2012 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:21:48 2012 TLS-Auth MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 03:21:48 2012 Socket Buffers: R=[124928->131072] S=[124928->131072]
Wed Jun 13 03:21:48 2012 ROUTE default_gateway=91.121.208.254
Wed Jun 13 03:21:48 2012 TUN/TAP device tun0 opened
Wed Jun 13 03:21:48 2012 TUN/TAP TX queue length set to 100
Wed Jun 13 03:21:48 2012 /sbin/ifconfig tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Wed Jun 13 03:21:48 2012 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Wed Jun 13 03:21:49 2012 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 03:21:49 2012 GID set to nogroup
Wed Jun 13 03:21:49 2012 UID set to nobody
Wed Jun 13 03:21:49 2012 UDPv4 link local (bound): [AF_INET]xxx.xxx.xxx.xxx:1193
Wed Jun 13 03:21:49 2012 UDPv4 link remote: [undef]
Wed Jun 13 03:21:49 2012 MULTI: multi_init called, r=256 v=256
Wed Jun 13 03:21:49 2012 IFCONFIG POOL: base=10.8.0.4 size=62
Wed Jun 13 03:21:49 2012 IFCONFIG POOL LIST
Wed Jun 13 03:21:49 2012 cyberjandry,10.8.0.4
Wed Jun 13 03:21:49 2012 hades,10.8.0.8
Wed Jun 13 03:21:49 2012 Initialization Sequence Completed
Wed Jun 13 03:22:58 2012 MULTI: multi_create_instance called
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Re-using SSL/TLS context
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 LZO compression initialized
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Local Options hash (VER=V4): '14168603'
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 Expected Remote Options hash (VER=V4): '504e774e'
Wed Jun 13 03:22:58 2012 58.35.172.192:6947 TLS: Initial packet from [AF_INET]58.35.172.192:6947, sid=527db04a 3a6a334c
Wed Jun 13 03:23:45 2012 58.35.172.192:6947 VERIFY OK: depth=1, /C=IT/ST=Roma/L=Roma/O=esempio/CN=esempio_CA/emailAddress=nobody@example.com
Wed Jun 13 03:23:45 2012 58.35.172.192:6947 VERIFY OK: depth=0, /C=IT/ST=Roma/L=Roma/O=esempio/CN=cyberjandry/emailAddress=nobody@example.com
Wed Jun 13 03:23:58 2012 58.35.172.192:6947 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Jun 13 03:23:58 2012 58.35.172.192:6947 TLS Error: TLS handshake failed
Wed Jun 13 03:23:58 2012 58.35.172.192:6947 SIGUSR1[soft,tls-error] received, client-instance restarting
Wed Jun 13 03:24:00 2012 MULTI: multi_create_instance called
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Re-using SSL/TLS context
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 LZO compression initialized
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Local Options hash (VER=V4): '14168603'
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 Expected Remote Options hash (VER=V4): '504e774e'
Wed Jun 13 03:24:00 2012 58.35.172.192:6970 TLS: Initial packet from [AF_INET]58.35.172.192:6970, sid=fa8f04a1 e05ed8f1
Wed Jun 13 03:24:18 2012 58.35.172.192:6970 VERIFY OK: depth=1, /C=IT/ST=Roma/L=Roma/O=esempio/CN=esempio_CA/emailAddress=nobody@example.com
Wed Jun 13 03:24:18 2012 58.35.172.192:6970 VERIFY OK: depth=0, /C=IT/ST=Roma/L=Roma/O=esempio/CN=cyberjandry/emailAddress=nobody@example.com
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Jun 13 03:24:28 2012 58.35.172.192:6970 [cyberjandry] Peer Connection Initiated with [AF_INET]58.35.172.192:6970
Wed Jun 13 03:24:28 2012 cyberjandry/58.35.172.192:6970 MULTI: Learn: 10.8.0.6 -> cyberjandry/58.35.172.192:6970
Wed Jun 13 03:24:28 2012 cyberjandry/58.35.172.192:6970 MULTI: primary virtual IP for cyberjandry/58.35.172.192:6970: 10.8.0.6
Wed Jun 13 03:24:39 2012 cyberjandry/58.35.172.192:6970 PUSH: Received control message: 'PUSH_REQUEST'
Wed Jun 13 03:24:39 2012 cyberjandry/58.35.172.192:6970 SENT CONTROL [cyberjandry]: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
Wed Jun 13 03:24:44 2012 cyberjandry/58.35.172.192:6970 PUSH: Received control message: 'PUSH_REQUEST'
Wed Jun 13 03:24:44 2012 cyberjandry/58.35.172.192:6970 SENT CONTROL [cyberjandry]: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
Log client Archlinux
Wed Jun 13 09:30:44 2012 OpenVPN 2.2.2 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] [eurephia] built on Jan 3 2012
Wed Jun 13 09:30:44 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Jun 13 09:30:44 2012 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
Wed Jun 13 09:30:44 2012 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:30:44 2012 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:30:44 2012 LZO compression initialized
Wed Jun 13 09:30:44 2012 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Wed Jun 13 09:30:44 2012 Socket Buffers: R=[163840->131072] S=[163840->131072]
Wed Jun 13 09:30:44 2012 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 13 09:30:44 2012 Local Options hash (VER=V4): '504e774e'
Wed Jun 13 09:30:44 2012 Expected Remote Options hash (VER=V4): '14168603'
Wed Jun 13 09:30:44 2012 UDPv4 link local: [undef]
Wed Jun 13 09:30:44 2012 UDPv4 link remote: xxx.xxx.xxx.xxx:1193
Wed Jun 13 09:30:45 2012 TLS: Initial packet from xxx.xxx.xxx.xxx:1193, sid=f9bf27ab 693e1eaf
Wed Jun 13 09:30:47 2012 VERIFY OK: depth=1, /C=IT/ST=Roma/L=Roma/O=esempio/CN=esempio_CA/emailAddress=nobody@example.com
Wed Jun 13 09:30:47 2012 VERIFY OK: nsCertType=SERVER
Wed Jun 13 09:30:47 2012 VERIFY OK: depth=0, /C=IT/ST=Roma/L=Roma/O=esempio/CN=server/emailAddress=nobody@example.com
Wed Jun 13 09:31:03 2012 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 09:31:03 2012 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:31:03 2012 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 13 09:31:03 2012 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 13 09:31:06 2012 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Jun 13 09:31:06 2012 [server] Peer Connection Initiated with xxx.xxx.xxx.xxx:1193
Wed Jun 13 09:31:09 2012 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Wed Jun 13 09:31:09 2012 PUSH: Received control message: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: timers and/or timeouts modified
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: --ifconfig/up options modified
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: route options modified
Wed Jun 13 09:31:09 2012 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Jun 13 09:31:09 2012 ROUTE default_gateway=192.168.2.1
Wed Jun 13 09:31:09 2012 TUN/TAP device tun0 opened
Wed Jun 13 09:31:09 2012 TUN/TAP TX queue length set to 100
Wed Jun 13 09:31:09 2012 /usr/sbin/ip link set dev tun0 up mtu 1500
Wed Jun 13 09:31:09 2012 /usr/sbin/ip addr add dev tun0 local 10.8.0.6 peer 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add xxx.xxx.xxx.xxx/32 via 192.168.2.1
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 0.0.0.0/1 via 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 128.0.0.0/1 via 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 10.8.0.0/24 via 10.8.0.5
Wed Jun 13 09:31:09 2012 /usr/sbin/ip route add 10.8.0.1/32 via 10.8.0.5
Wed Jun 13 09:31:09 2012 Initialization Sequence Completed
ifconfig server:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:186 errors:0 dropped:0 overruns:0 frame:0
TX packets:121 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12247 (11.9 KiB) TX bytes:10807 (10.5 KiB)
ifconfig client:
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 metric 1
inet 10.8.0.6 netmask 255.255.255.255 destination 10.8.0.5
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 9 bytes 864 (864.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29 bytes 2061 (2.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Ping dal client una volta connesso alla vpn:
PING www-cctld.l.google.com (74.125.71.94) 56(84) bytes of data.
From 10.8.0.1 icmp_seq=2 Destination Port Unreachable
From 10.8.0.1 icmp_seq=4 Destination Port Unreachable
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.1: icmp_req=4 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=5 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=6 ttl=64 time=394 ms
64 bytes from 10.8.0.1: icmp_req=7 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=8 ttl=64 time=393 ms
64 bytes from 10.8.0.1: icmp_req=9 ttl=64 time=393 ms
Le prove che ho fatto:
Tante, troppe, sono 3 giorni che faccio solo questo, cmq posso dire che
- ho disabilitato il firewall sulla macchina, per vedere se era un problema di iptables,
- ho provato il protocollo tcp al posto di udp
- ho provato la stessa configurazione del server su un'altro server debian pulito pulito, ma con lo stesso risultato.
- ho provato svariate regole di iptables
- ho provato ad usare tap e non tun
- ho provato a mettere l'ip fisso come in questa guida: http://guide.debianizzati.org/index.php/Openvpn
Insomma sono a corto di idee, se ne avete qualcuna voi, benvenga.
Grazie mille
H2K