brebreone
(usa Ubuntu)
Enviado em 15/09/2017 - 06:38h
LSSilva escreveu:
Deixa só 1 arquivo (ovpn) mesmo no cliente. É linux ou windows o cliente? Se for linux renomeia pra *.conf, exemplo: mv cliente1.ovpn client1.conf e deixa somente um arquivo.
Uma coisa:
Na configuração do servidor:
ao invés de: proto tcp
use : proto tcp-server
no cliente use: proto tcp-client.
Testa pra gente.
Apaguei os outros arquivos e renomeei para client1.conf, também fiz as alterações que sugeriu.
No comando:
sudo openvpn --config client1.conf
Reaparece:
Fri Sep 15 11:23:58 2017 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
Fri Sep 15 11:23:58 2017 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Fri Sep 15 11:23:58 2017 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Fri Sep 15 11:23:58 2017 Control Channel Authentication: tls-auth using INLINE static key file
Fri Sep 15 11:23:58 2017 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Sep 15 11:23:58 2017 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Sep 15 11:23:58 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Fri Sep 15 11:23:58 2017 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Fri Sep 15 11:23:58 2017 Attempting to establish TCP connection with [AF_INET]192.168.0.25:443 [nonblock]
Fri Sep 15 11:23:58 2017 TCP connection established with [AF_INET]192.168.0.25:443
Fri Sep 15 11:23:58 2017 TCPv4_CLIENT link local: [undef]
Fri Sep 15 11:23:58 2017 TCPv4_CLIENT link remote: [AF_INET]192.168.0.25:443
Fri Sep 15 11:23:58 2017 Connection reset, restarting [0]
Fri Sep 15 11:23:58 2017 SIGUSR1[soft,connection-reset] received, process restarting
Fri Sep 15 11:23:58 2017 Restart pause, 5 second(s)
Fri Sep 15 11:24:03 2017 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Fri Sep 15 11:24:03 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Fri Sep 15 11:24:03 2017 Attempting to establish TCP connection with [AF_INET]192.168.0.25:443 [nonblock]
spikey:
Mude a porta para 1194 e protocolo TCP
Se a conexäo com o servidor ëcom ip dinâmico, sem problemas. Basta utilizar a opção float que o próprio OpenVPN se encarrega de atualizar o ip.
Aonde eu uso o --float? no comando?
Após o teste de LLSilva, eu alterei para 1194 e protocolo TCP e aqui está o resultado:
Fri Sep 15 11:33:21 2017 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
Fri Sep 15 11:33:21 2017 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Fri Sep 15 11:33:21 2017 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Fri Sep 15 11:33:21 2017 Control Channel Authentication: tls-auth using INLINE static key file
Fri Sep 15 11:33:21 2017 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Sep 15 11:33:21 2017 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Sep 15 11:33:21 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Fri Sep 15 11:33:21 2017 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Fri Sep 15 11:33:21 2017 Attempting to establish TCP connection with [AF_INET]192.168.0.25:1194 [nonblock]
Fri Sep 15 11:33:21 2017 TCP: connect to [AF_INET]192.168.0.25:1194 failed, will try again in 5 seconds: Connection refused
Vou voltar para 443 que está tendo mais sucesso !