Dificuldade em usar uma VPN no Kali Linux

0

Eu estou tentando conectar minha máquina rodando o Kali Linux para uma VPN (usando conexão OpenVPN). Eu criei uma conta gratuita aqui , baixei os arquivos de configuração necessários e, em seguida, adicionei a VPN no Kali Network Manager. Quando tento me conectar a essa VPN, ela diz que estou conectado. No entanto, quando vou verificar meu local de IP / Geo, ele não mudou. Qualquer ajuda seria apreciada!

Updated Information!

Tabelas de roteamento sem VPN:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlan0

Tabelas de roteamento com VPN:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlan0
10.12.0.14      0.0.0.0         255.255.255.255 UH    50     0        0 tun0
23.19.26.250    192.168.1.1     255.255.255.255 UGH   600    0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlan0

Saída de arquivos OpenVPN (denominada update-resolv-conf):

#!/bin/bash
# 
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood and Chris Hanson.
# Licensed under the GNU GPL.  See /usr/share/common-licenses/GPL. 
# 
# Example envs set from openvpn:
#
#     foreign_option_1='dhcp-option DNS 193.43.27.132'
#     foreign_option_2='dhcp-option DNS 193.43.27.133'
#     foreign_option_3='dhcp-option DOMAIN be.bnc.ch'
#

[ -x /sbin/resolvconf ] || exit 0
[ "$script_type" ] || exit 0
[ "$dev" ] || exit 0

split_into_parts()
{
    part1="$1"
    part2="$2"
    part3="$3"
}

case "$script_type" in
  up)
    NMSRVRS=""
    SRCHS=""
    for optionvarname in ${!foreign_option_*} ; do
        option="${!optionvarname}"
        echo "$option"
        split_into_parts $option
        if [ "$part1" = "dhcp-option" ] ; then
            if [ "$part2" = "DNS" ] ; then
                NMSRVRS="${NMSRVRS:+$NMSRVRS }$part3"
            elif [ "$part2" = "DOMAIN" ] ; then
                SRCHS="${SRCHS:+$SRCHS }$part3"
            fi 
        fi
    done
    R=""
    [ "$SRCHS" ] && R="search $SRCHS
 "
    for NS in $NMSRVRS ; do
        R="${R}nameserver $NS
"
    done
    echo -n "$R" | /sbin/resolvconf -a "${dev}.openvpn"
    ;;
  down)
    /sbin/resolvconf -d "${dev}.openvpn"
    ;;
esac

Depois de executar o comando sugerido:

root@kali:/etc/openvpn# openvpn --config config.ovpn
Sat Mar  5 14:45:15 2016 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL   (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan 21 2016
Sat Mar  5 14:45:15 2016 library versions: OpenSSL 1.0.2f  28 Jan 2016, LZO 2.08
Sat Mar  5 14:45:15 2016 WARNING: file 'client.key' is group or others  accessible
Sat Mar  5 14:45:15 2016 UDPv4 link local: [undef]
Sat Mar  5 14:45:15 2016 UDPv4 link remote: [AF_INET]23.19.26.250:5353
Sat Mar  5 14:45:16 2016 [server] Peer Connection Initiated with     [AF_INET]23.19.26.250:5353
Sat Mar  5 14:45:18 2016 TUN/TAP device tun2 opened
Sat Mar  5 14:45:18 2016 do_ifconfig, tt->ipv6=0,     tt->did_ifconfig_ipv6_setup=0
Sat Mar  5 14:45:18 2016 /sbin/ip link set dev tun2 up mtu 1500
Sat Mar  5 14:45:18 2016 /sbin/ip addr add dev tun2 local 10.13.0.98 peer     10.13.0.97
RTNETLINK answers: File exists
Sat Mar  5 14:45:23 2016 ERROR: Linux route add command failed: external  program exited with error status: 2
RTNETLINK answers: File exists
Sat Mar  5 14:45:23 2016 ERROR: Linux route add command failed: external    program exited with error status: 2
RTNETLINK answers: File exists
Sat Mar  5 14:45:23 2016 ERROR: Linux route add command failed: external     program exited with error status: 2
RTNETLINK answers: File exists
Sat Mar  5 14:45:23 2016 ERROR: Linux route add command failed: external   program exited with error status: 2
Sat Mar  5 14:45:23 2016 Initialization Sequence Completed
    
por Steve 02.03.2016 / 05:16

1 resposta

1

Eu mesmo me registrei para o mesmo serviço, e ele funciona bem. Seu arquivo config deve ficar assim,

remote 23.19.26.250
port 5353
client
dev tun
pull
resolv-retry infinite
ca ca.crt
cert client.crt
key client.key
persist-key
ns-cert-type server
persist-tun
comp-lzo
nobind
mute-replay-warnings
route-delay 5
keepalive 5 28

Certifique-se de que o seu é idêntico ao meu. Em seguida, emita estes comandos:

 apt-get install openvpn
 openvpn --config config.ovpn

em que o segundo comando deve ser fornecido no diretório em que você possui os arquivos ca.crt, client.crt, client.key, config.ovpn .

Agora, abra um novo terminal e emita este comando:

 wget http://ipinfo.io/ip -qO -

Sua saída deve ser 23.19.26.150

    
por 05.03.2016 / 19:02