• Benvenuti su RaspberryItaly!
Benvenuto ospite! Login Login con Facebook Registrati Login with Facebook


Valutazione discussione:
  • 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5

[-]
Tags
su openvpn client configurazione info del

[Problema] [OpenVPN] Info su configurazione del client
#1
Buonasera a tutti, chiedo aiuto a chi è più esperto di me riguardo OpenVPN in quanto ho qualche problema con la configurazione lato client.

Sto utilizzando un server OpenVPN realizzato su di un dispositivo e pre-configurato (quindi ho dovuto cambiare solo qualche impostazione), per il resto non ho fatto modifiche in quanto devo tenere le impostazioni per compatibilità tra diversi dispositivi.
Ho configurato anche altri dispositivi diversi (sempre client) e funzionano tutti perfettamente.
Vado a installare e configurare il client OpenVPN su Raspberry.... e non riesco a collegarmi.

Le impostazioni del server sono queste:

- Server IP: 2.194.75.64 (lavoro con un router GPRS per fare delle prove, l'indirizzo lo imposto di volta in volta sui client)
- porta: 1194
- protocollo: TCP
- compressione LZO: disabilitata
- mode: TUN
- encryption: AES-256/CBC-256
- authenticazione: TLS+password
- TLS cipher: all
- utente: OVPN_Raspberry_test
- password: raspberry
- HMAC authentication algorithm: SHA1
- certificati creati per i vari client client:
ca.crt
OVPN_Raspberry_test.crt
OVPN_Raspberry_test.key


File client.conf:
Codice:
client
cipher AES-256-CBC

dev tun
port 1194
tun-mtu 1400
proto tcp-client
remote 2.195.162.143
#resolv-retry infinite
keepalive 5 10
#nobind
remote-cert-tls server
ca /etc/openvpn/ca.crt
cert /etc/openvpn/OpenVPN_Raspberry_test.crt
key /etc/openvpn/OpenVPN_Raspberry_test.key
#comp-lzo yes
persist-key
persist-tun
verb 11
auth-user-pass login.conf

login.conf:
Codice:
OVPN_Raspberry_test
password

Ed ecco il log: dopo aver inserito la password dei certificati non capisco cosa succeda...
Codice:
[...]
Enter Private Key Password: **********
Mon Jan 20 17:46:18 2020 us=190641 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Jan 20 17:46:18 2020 us=221659 PRNG init md=SHA1 size=36
Mon Jan 20 17:46:18 2020 us=221931 WARNING: normally if you use --mssfix and/or --fragment, you should also set --tun-mtu 1500 (currently it is 1400)
Mon Jan 20 17:46:18 2020 us=222024 TLS: tls_session_init: entry
Mon Jan 20 17:46:18 2020 us=222114 PID packet_id_init seq_backtrack=64 time_backtrack=15
Mon Jan 20 17:46:18 2020 us=222389 PID packet_id_init seq_backtrack=64 time_backtrack=15
Mon Jan 20 17:46:18 2020 us=222576 TLS: tls_session_init: new session object, sid=224bdba2 151f916f
Mon Jan 20 17:46:18 2020 us=222695 TLS: tls_session_init: entry
Mon Jan 20 17:46:18 2020 us=222892 PID packet_id_init seq_backtrack=64 time_backtrack=15
Mon Jan 20 17:46:18 2020 us=223172 PID packet_id_init seq_backtrack=64 time_backtrack=15
Mon Jan 20 17:46:18 2020 us=223300 TLS: tls_session_init: new session object, sid=a0da2e16 ca0b1e92
Mon Jan 20 17:46:18 2020 us=223384 Control Channel MTU parms [ L:1523 D:1210 EF:40 EB:0 ET:0 EL:3 ]
Mon Jan 20 17:46:18 2020 us=223549 MTU DYNAMIC mtu=1450, flags=2, 1523 -> 1450
Mon Jan 20 17:46:18 2020 us=223700 RESOLVE_REMOTE flags=0x0101 phase=1 rrs=0 sig=-1 status=0
Mon Jan 20 17:46:18 2020 us=223806 Data Channel MTU parms [ L:1523 D:1450 EF:123 EB:389 ET:0 EL:3 ]
Mon Jan 20 17:46:18 2020 us=223982 crypto_adjust_frame_parameters: Adjusting frame parameters for crypto by 56 bytes
Mon Jan 20 17:46:18 2020 us=224100 calc_options_string_link_mtu: link-mtu 1523 -> 1459
Mon Jan 20 17:46:18 2020 us=224247 crypto_adjust_frame_parameters: Adjusting frame parameters for crypto by 56 bytes
Mon Jan 20 17:46:18 2020 us=224331 calc_options_string_link_mtu: link-mtu 1523 -> 1459
Mon Jan 20 17:46:18 2020 us=224433 Local Options String (VER=V4): 'V4,dev-type tun,link-mtu 1459,tun-mtu 1400,proto TCPv4_CLIENT,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-client'
Mon Jan 20 17:46:18 2020 us=224512 Expected Remote Options String (VER=V4): 'V4,dev-type tun,link-mtu 1459,tun-mtu 1400,proto TCPv4_SERVER,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-server'
Mon Jan 20 17:46:18 2020 us=224658 STREAM: RESET
Mon Jan 20 17:46:18 2020 us=224747 STREAM: INIT maxlen=1526
Mon Jan 20 17:46:18 2020 us=224838 TCP/UDP: Preserving recently used remote address: [AF_INET]2.195.166.15:1194
Mon Jan 20 17:46:18 2020 us=225003 Socket Buffers: R=[131072->131072] S=[16384->16384]
Mon Jan 20 17:46:18 2020 us=225178 Attempting to establish TCP connection with [AF_INET]2.195.166.15:1194 [nonblock]
Mon Jan 20 17:46:19 2020 us=225818 TCP connection established with [AF_INET]2.195.166.15:1194
Mon Jan 20 17:46:19 2020 us=226080 TCP_CLIENT link local: (not bound)
Mon Jan 20 17:46:19 2020 us=226233 TCP_CLIENT link remote: [AF_INET]2.195.166.15:1194
Mon Jan 20 17:46:19 2020 us=226434 TLS Warning: no data channel send key available:  [key#0 state=S_INITIAL id=0 sid=00000000 00000000] [key#1 state=S_UNDEF id=0 sid=00000000 00000000] [key#2 state=S_UNDEF id=0 sid=00000000 00000000]
Mon Jan 20 17:46:19 2020 us=226565 SENT PING
Mon Jan 20 17:46:19 2020 us=226659 TIMER: coarse timer wakeup 1 seconds
Mon Jan 20 17:46:19 2020 us=226812 TLS: tls_multi_process: i=0 state=S_INITIAL, mysid=224bdba2 151f916f, stored-sid=00000000 00000000, stored-ip=[AF_INET]2.195.166.15:1194
Mon Jan 20 17:46:19 2020 us=226914 TLS: tls_process: chg=0 ks=S_INITIAL lame=S_UNDEF to_link->len=0 wakeup=604800
Mon Jan 20 17:46:19 2020 us=226995 ACK mark active outgoing ID 0
Mon Jan 20 17:46:19 2020 us=227080 TLS: Initial Handshake, sid=224bdba2 151f916f
Mon Jan 20 17:46:19 2020 us=227156 ACK reliable_can_send active=1 current=1 : [1] 0
Mon Jan 20 17:46:19 2020 us=227219 ACK reliable_send ID 0 (size=4 to=2)
Mon Jan 20 17:46:19 2020 us=227285 Reliable -> TCP/UDP
Mon Jan 20 17:46:19 2020 us=227358 ACK reliable_send_timeout 2 [1] 0
Mon Jan 20 17:46:19 2020 us=227423 TLS: tls_process: timeout set to 2
Mon Jan 20 17:46:19 2020 us=227529 TLS: tls_multi_process: i=1 state=S_INITIAL, mysid=a0da2e16 ca0b1e92, stored-sid=00000000 00000000, stored-ip=[AF_UNSPEC]
Mon Jan 20 17:46:19 2020 us=227638 TLS: tls_multi_process: i=2 state=S_UNDEF, mysid=00000000 00000000, stored-sid=00000000 00000000, stored-ip=[AF_UNSPEC]
Mon Jan 20 17:46:19 2020 us=227767 RANDOM USEC=219816
Mon Jan 20 17:46:19 2020 us=227861 STREAM: SET NEXT, buf=[516,0] next=[516,1526] len=-1 maxlen=1526
Mon Jan 20 17:46:19 2020 us=227942 PO_CTL rwflags=0x0003 ev=3 arg=0x000ba0dc
Mon Jan 20 17:46:19 2020 us=228037 I/O WAIT T?|T?|SR|SW [1/219816]
Mon Jan 20 17:46:19 2020 us=228139 PO_WAIT[0,0] fd=3 rev=0x00000004 rwflags=0x0002 arg=0x000ba0dc
Mon Jan 20 17:46:19 2020 us=228218  event_wait returned 1
Mon Jan 20 17:46:19 2020 us=228288 I/O WAIT status=0x0002
Mon Jan 20 17:46:19 2020 us=228418 TCP_CLIENT WRITE [14] to [AF_INET]2.195.166.15:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=224bdba2 151f916f [ ] pid=0 DATA
Mon Jan 20 17:46:19 2020 us=228497 STREAM: WRITE 14 offset=30
Mon Jan 20 17:46:19 2020 us=228639 TCP_CLIENT write returned 16
Mon Jan 20 17:46:19 2020 us=228806 TLS: tls_multi_process: i=0 state=S_PRE_START, mysid=224bdba2 151f916f, stored-sid=00000000 00000000, stored-ip=[AF_INET]2.195.166.15:1194
Mon Jan 20 17:46:19 2020 us=228898 TLS: tls_process: chg=0 ks=S_PRE_START lame=S_UNDEF to_link->len=0 wakeup=604800
Mon Jan 20 17:46:19 2020 us=228991 ACK reliable_can_send active=1 current=0 : [1] 0
Mon Jan 20 17:46:19 2020 us=229387 SSL state (connect): before/connect initialization
Mon Jan 20 17:46:19 2020 us=229750 SSL state (connect): SSLv2/v3 write client hello A
Mon Jan 20 17:46:19 2020 us=229976 ACK reliable_send_timeout 2 [1] 0
Mon Jan 20 17:46:19 2020 us=230118 TLS: tls_process: timeout set to 2
Mon Jan 20 17:46:19 2020 us=230279 TLS: tls_multi_process: i=1 state=S_INITIAL, mysid=a0da2e16 ca0b1e92, stored-sid=00000000 00000000, stored-ip=[AF_UNSPEC]
Mon Jan 20 17:46:19 2020 us=230409 TLS: tls_multi_process: i=2 state=S_UNDEF, mysid=00000000 00000000, stored-sid=00000000 00000000, stored-ip=[AF_UNSPEC]
Mon Jan 20 17:46:19 2020 us=230553 STREAM: SET NEXT, buf=[516,0] next=[516,1526] len=-1 maxlen=1526
Mon Jan 20 17:46:19 2020 us=230675 PO_CTL rwflags=0x0001 ev=3 arg=0x000ba0dc
Mon Jan 20 17:46:19 2020 us=230804 I/O WAIT T?|T?|SR|Sw [1/219816]
Mon Jan 20 17:46:20 2020 us=452249  event_wait returned 0
Mon Jan 20 17:46:20 2020 us=452504 I/O WAIT status=0x0020
Mon Jan 20 17:46:20 2020 us=452606 TIMER: coarse timer wakeup 1 seconds
Mon Jan 20 17:46:20 2020 us=452783 TLS: tls_multi_process: i=0 state=S_PRE_START, mysid=224bdba2 151f916f, stored-sid=00000000 00000000, stored-ip=[AF_INET]2.195.166.15:1194




Magari qualcuno più esperto potrà darmi qualche indicazione.
Grazie.
Risposta
#2
Ci hai mai navigato con la con perché mi ha tanto problema di nat tuo gestore rete. Puoi testare connessione Lan normale e vedi se va. Se va chiaramente il tuo gestore sim non permette connessioni vpn oppure devi contattarlo perché ciò avvenga

Inviato dal mio SM-G975F utilizzando Tapatalk
Risposta
#3
Eccoci qua!
Con la scusa della quarantena sono riuscito a risolvere: ho preso 3-4 guide su OpenVPN che ho trovato in rete e mi sono messo a testare tutte le configurazioni.
Da N guide diverse sono riuscito a farne 1 funzionante, appena finisco di metterla in ordine posto i risultati.
Il problema erano i certificati: sul server OpenVPN mi sono dimenticato (sarebbe più corretto dire che non era specificato nella guida che avevo trovato) di attivare un flag per rendere i certificati attendibili.
Risposta
  


Vai al forum:


Navigazione: 1 Ospite(i)
Forum con nuovi Post
Forum senza nuovi post
Forum bloccato
Forum Redirect