problemi con openvpn server-to-client

Tutto quello che ha a che fare con GNU/Linux, soprattutto in ambito sistemistico.

Moderatore: Federico.Lagni

Rispondi
Avatar utente
richardsith
Cisco fan
Messaggi: 37
Iscritto il: mar 08 lug , 2008 1:44 pm
Località: everywhere
Contatta:

ciao a tutti,
sono nuovo e spero di aver usato il post corretto.
oggi stavo provando a crearmi un piccola vpn a casa, non per altro, ma la curiosità di imparare qualcosa di nuovo, e ho riscontrato un prb credo in fase di configurazione, ma nn ne sono sicuro. Vi illustro in breve cosa sto facendo. Ho 2 pc, su uno ho installato ubuntu 8.04 desktop edition e sull'altro ubuntu 8.04 desktop e vorrei provare a creare una openvpn molto semplice. tra le 2 macchine ce un router netgear e un hub di rete. La procedura che ho seguito è stata la seguente. Ho installato ad entrambi i pc openvpn poi sul server ho creato la chiave simmetrica e il filetto generato lho copiato anche sul client. successivamente ho creato il file openvpn.conf sul server scrivendogli quanto segue:

dev tun
proto tcp-server
local 192.168.0.2
lport 5000
ifconfig 10.0.0.2 10.0.0.3
secret /etc/openvpn/static.key
verb 3
log-append /var/log/openvpn.log

mentre al client questaltro:

remote 192.168.0.2
dev tun
proto tcp-client
local 192.168.0.4
rport 5000
ifconfig 10.0.0.3 10.0.0.2
secret /etc/openvpn/static.key
verb 3
log-append /var/log/openvpn.log

il prb mi sorge qdo vado ha controllare i log. Dalla parte server mi sembra tutto ok cmq riporto lo stesso il log:

Tue Jul 8 02:07:27 2008 Restart pause, 1 second(s)
Tue Jul 8 02:07:28 2008 /usr/sbin/openvpn-vulnkey -q /etc/openvpn/static.key
Tue Jul 8 02:07:28 2008 Static Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Jul 8 02:07:28 2008 Static Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 8 02:07:28 2008 Static Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Jul 8 02:07:28 2008 Static Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 8 02:07:28 2008 TUN/TAP device tun0 opened
Tue Jul 8 02:07:28 2008 TUN/TAP TX queue length set to 100
Tue Jul 8 02:07:28 2008 ifconfig tun0 10.0.0.2 pointopoint 10.0.0.3 mtu 1500
Tue Jul 8 02:07:28 2008 Data Channel MTU parms [ L:1546 D:1450 EF:46 EB:4 ET:0 EL:0 ]
Tue Jul 8 02:07:28 2008 Local Options hash (VER=V4): 'f4192c8e'
Tue Jul 8 02:07:28 2008 Expected Remote Options hash (VER=V4): 'ac00bfe7'
Tue Jul 8 02:07:28 2008 Listening for incoming TCP connection on 192.168.0.2:5000
Tue Jul 8 02:07:32 2008 TCP connection established with 192.168.0.4:1194
Tue Jul 8 02:07:32 2008 Socket Buffers: R=[87380->131072] S=[16384->131072]
Tue Jul 8 02:07:32 2008 TCPv4_SERVER link local (bound): 192.168.0.2:5000
Tue Jul 8 02:07:32 2008 TCPv4_SERVER link remote: 192.168.0.4:1194
Tue Jul 8 02:07:42 2008 Connection reset, restarting
Tue Jul 8 02:07:42 2008 TCP/UDP: Closing socket
Tue Jul 8 02:07:42 2008 Closing TUN/TAP interface
Tue Jul 8 02:07:42 2008 SIGUSR1[soft,connection-reset] received, process restarting

e cmq mi continua ha ripetere le stesse righe senza terminare. mentre sul lato client ottengo qstaltro output

Tue Jul 8 02:07:53 2008 Restart pause, 5 second(s)
Tue Jul 8 02:07:58 2008 /usr/sbin/openvpn-vulnkey -q /etc/openvpn/static.key
Tue Jul 8 02:07:58 2008 Static Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Jul 8 02:07:58 2008 Static Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 8 02:07:58 2008 Static Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Jul 8 02:07:58 2008 Static Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 8 02:07:58 2008 TUN/TAP device tun0 opened
Tue Jul 8 02:07:58 2008 TUN/TAP TX queue length set to 100
Tue Jul 8 02:07:58 2008 ifconfig tun0 10.0.0.3 pointopoint 10.0.0.2 mtu 1500
Tue Jul 8 02:07:58 2008 Data Channel MTU parms [ L:1546 D:1450 EF:46 EB:4 ET:0 EL:0 ]
Tue Jul 8 02:07:58 2008 Local Options hash (VER=V4): 'ac00bfe7'
Tue Jul 8 02:07:58 2008 Expected Remote Options hash (VER=V4): 'f4192c8e'
Tue Jul 8 02:07:58 2008 Attempting to establish TCP connection with 192.168.0.2:5000 [nonblock]
Tue Jul 8 02:07:59 2008 TCP connection established with 192.168.0.2:5000
Tue Jul 8 02:07:59 2008 Socket Buffers: R=[87380->131072] S=[16384->131072]
Tue Jul 8 02:07:59 2008 TCPv4_CLIENT link local (bound): 192.168.0.4:1194
Tue Jul 8 02:07:59 2008 TCPv4_CLIENT link remote: 192.168.0.2:5000
Tue Jul 8 02:08:08 2008 Authenticate/Decrypt packet error: packet HMAC authentication failed
Tue Jul 8 02:08:08 2008 Fatal decryption error (process_incoming_link), restarting
Tue Jul 8 02:08:08 2008 TCP/UDP: Closing socket
Tue Jul 8 02:08:08 2008 Closing TUN/TAP interface
Tue Jul 8 02:08:08 2008 SIGUSR1[soft,decryption-error] received, process restarting

da qsto output qualcosa riesco ha capire ma non ne ricavo niente. Mentre dalla parte server non ci capisco proprio niente. Qualcuno di animo buono mi potrebbe aiutare per favore a capire dove sbaglio ed aiutarmi!!!grazie 1000.
Rispondi