Edite seu arquivo .ovpn
e coloque sua linha de conexão tcp na tag de conexão e defina todos os needy_proxy lá.
<connection>
remote vpn_ip_here vpn_port tcp
http-proxy y.y.y.y 8080 (replaced actual IP here)
http-proxy-retry
</connection>
Gostaria de me conectar a uma VPN usando o OpenVPN do terminal openvpn --config client.ovpn , mas eu tenho que ligar por trás de um proxy http / https para acessar a internet. Então, como eu configuro isso? Da mesma forma, se eu decidir conectar usando este link , como configurá-lo por trás de um proxy? Eu estou usando o Ubuntu 14.04.
Editar:
Consegui conectar-me à vpn editando o arquivo ovpn. Mas não acho que esteja funcionando bem. Aqui estão os logs.
Sat Aug 22 20:23:44 2015 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Sat Aug 22 20:23:44 2015 NOTE: --fast-io is disabled since we are not using UDP
Sat Aug 22 20:23:44 2015 Control Channel Authentication: tls-auth using INLINE static key file
Sat Aug 22 20:23:44 2015 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Aug 22 20:23:44 2015 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Aug 22 20:23:44 2015 Socket Buffers: R=[87380->131072] S=[16384->131072]
Sat Aug 22 20:23:44 2015 Attempting to establish TCP connection with [AF_INET]10.3.100.207:8080 [nonblock]
Sat Aug 22 20:23:45 2015 TCP connection established with [AF_INET]10.3.100.207:8080
Sat Aug 22 20:23:45 2015 Send to HTTP proxy: 'CONNECT 158.255.212.117:443 HTTP/1.0'
Sat Aug 22 20:23:46 2015 HTTP proxy returned: 'HTTP/1.1 200 Connection Established'
Sat Aug 22 20:23:48 2015 TCPv4_CLIENT link local: [undef]
Sat Aug 22 20:23:48 2015 TCPv4_CLIENT link remote: [AF_INET]10.3.100.207:8080
Sat Aug 22 20:23:48 2015 TLS: Initial packet from [AF_INET]10.3.100.207:8080, sid=517792d2 be30e636
Sat Aug 22 20:23:48 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sat Aug 22 20:23:51 2015 VERIFY OK: depth=1, C=AT, ST=AT, L=SanFrancisco, O=NordVPN, OU=AT, CN=vpn-at.nordvpn.com, name=vpn-at.nordvpn.com, [email protected]
Sat Aug 22 20:23:51 2015 Validating certificate key usage
Sat Aug 22 20:23:51 2015 ++ Certificate has key usage 00a0, expects 00a0
Sat Aug 22 20:23:51 2015 VERIFY KU OK
Sat Aug 22 20:23:51 2015 Validating certificate extended key usage
Sat Aug 22 20:23:51 2015 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sat Aug 22 20:23:51 2015 VERIFY EKU OK
Sat Aug 22 20:23:51 2015 VERIFY OK: depth=0, C=PA, ST=PA, L=Panama, O=NordVPN, OU=NordVPN, CN=vpn-at.nordvpn.com, name=NordVPN, [email protected]
Sat Aug 22 20:23:55 2015 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Sat Aug 22 20:23:55 2015 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Aug 22 20:23:55 2015 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Sat Aug 22 20:23:55 2015 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Aug 22 20:23:55 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Sat Aug 22 20:23:55 2015 [vpn-at.nordvpn.com] Peer Connection Initiated with [AF_INET]10.3.100.207:8080
Sat Aug 22 20:23:57 2015 SENT CONTROL [vpn-at.nordvpn.com]: 'PUSH_REQUEST' (status=1)
Sat Aug 22 20:23:57 2015 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 198.7.63.141,dhcp-option DNS 78.46.223.24,route 10.7.7.1,topology net30,ping 5,ping-restart 30,ifconfig 10.7.7.202 10.7.7.201'
Sat Aug 22 20:23:57 2015 OPTIONS IMPORT: timers and/or timeouts modified
Sat Aug 22 20:23:57 2015 OPTIONS IMPORT: --ifconfig/up options modified
Sat Aug 22 20:23:57 2015 OPTIONS IMPORT: route options modified
Sat Aug 22 20:23:57 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Aug 22 20:23:57 2015 ROUTE_GATEWAY 10.109.66.2/255.255.255.0 IFACE=eth0 HWADDR=d4:be:d9:4b:85:fc
Sat Aug 22 20:23:57 2015 TUN/TAP device tun0 opened
Sat Aug 22 20:23:57 2015 TUN/TAP TX queue length set to 100
Sat Aug 22 20:23:57 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Aug 22 20:23:57 2015 /sbin/ip link set dev tun0 up mtu 1500
Sat Aug 22 20:23:57 2015 /sbin/ip addr add dev tun0 local 10.7.7.202 peer 10.7.7.201
Sat Aug 22 20:23:57 2015 /sbin/ip route add 10.3.100.207/32 via 10.109.66.2
Sat Aug 22 20:23:57 2015 /sbin/ip route add 0.0.0.0/1 via 10.7.7.201
Sat Aug 22 20:23:57 2015 /sbin/ip route add 128.0.0.0/1 via 10.7.7.201
Sat Aug 22 20:23:57 2015 /sbin/ip route add 10.7.7.1/32 via 10.7.7.201
Sat Aug 22 20:23:57 2015 Initialization Sequence Completed
Mas nada de novo parece acontecer com a Internet, ou seja, a mesma funcionalidade de antes.
Edite seu arquivo .ovpn
e coloque sua linha de conexão tcp na tag de conexão e defina todos os needy_proxy lá.
<connection>
remote vpn_ip_here vpn_port tcp
http-proxy y.y.y.y 8080 (replaced actual IP here)
http-proxy-retry
</connection>