Hackplayers / 4nonimizer

A bash script for anonymizing the public IP used to browsing Internet, managing the connection to TOR network and to different VPNs providers (OpenVPN)
GNU General Public License v3.0
611 stars 192 forks source link

[SOLVED]: dig: couldn't get address for 'resolver1.opendns.com': not found #8

Closed zpol closed 7 years ago

zpol commented 7 years ago

UPDATE: [SOLVED]:

a) There was the damm network-manager started so I stop the service. b) For a strange reason my computer was not able to reach the DNS's listed below in my resolv.conf file. I just changed to google DNS's and now it's working perfectly.

Just executing the script for the first time and getting this in a Kali Linux (Linux olv 4.0.0-kali1-amd64 #1 SMP Debian 4.0.4-1+kali2 (2015-06-03) x86_64 GNU/Linux)

Looks like dig can not resolve that host. Any suggestion?

Thanks in advance.

vmotos commented 7 years ago

hi, this dns server is used to show you your public ip. Probably you didn't have Internet connect in that moment. Could you check it? Are your network interfaces names like eth0?

zpol commented 7 years ago

yes , everything is working properly with my Inet connection.

Some tests & debugging:

guest@olv:~$ netstat -rn

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
172.17.0.0      0.0.0.0         255.255.0.0     U         0 0          0 docker0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0

guest@olv:~$ cat /etc/resolv.conf

nameserver 87.216.1.65
nameserver 87.216.1.66

guest@olv:~$ ping google.com

PING google.com (216.58.201.142) 56(84) bytes of data.
64 bytes from mad06s25-in-f142.1e100.net (216.58.201.142): icmp_seq=1 ttl=55 time=64.2 ms
^C
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 64.282/64.282/64.282/0.000 ms

And script output in debug mode:

 comprobacion=
+ '[' -z ']'
+ for i in '{0..1..30}'
+ echo -en .
.+ (( count1=count1+1 ))
+ '[' 30 -eq 30 ']'
+ clear

+ echo -ne '\n\e[31m[+]\e[0m There is a problem starting openvpn. Please, check nohup.out for details\n\n'

[+] There is a problem starting openvpn. Please, check nohup.out for details

++ cat /opt/4nonimizer/4nonimizer
++ awk NR==73
++ awk '-F;' '{print $1}'
++ awk -F/ '{print $5}'
+ current_provider=vpngate
+ tail -n 30 /opt/4nonimizer/vpn/vpngate/nohup.out
Fri Nov  4 12:01:30 2016 Data Channel Encrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Fri Nov  4 12:01:30 2016 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Nov  4 12:01:30 2016 Data Channel Decrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Fri Nov  4 12:01:30 2016 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Nov  4 12:01:30 2016 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Fri Nov  4 12:01:30 2016 [eaz36c7.com] Peer Connection Initiated with [AF_INET]210.191.124.213:1454
Fri Nov  4 12:01:32 2016 SENT CONTROL [eaz36c7.com]: 'PUSH_REQUEST' (status=1)
Fri Nov  4 12:01:33 2016 PUSH: Received control message: 'PUSH_REPLY,ping 3,ping-restart 10,ifconfig 10.211.1.9 10.211.1.10,dhcp-option DNS 10.211.254.254,dhcp-option DNS 8.8.8.8,route-gateway 10.211.1.10,redirect-gateway def1'
Fri Nov  4 12:01:33 2016 OPTIONS IMPORT: timers and/or timeouts modified
Fri Nov  4 12:01:33 2016 OPTIONS IMPORT: --ifconfig/up options modified
Fri Nov  4 12:01:33 2016 OPTIONS IMPORT: route options modified
Fri Nov  4 12:01:33 2016 OPTIONS IMPORT: route-related options modified
Fri Nov  4 12:01:33 2016 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Nov  4 12:01:33 2016 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 IFACE=eth0 HWADDR=2e:c6:f2:54:07:67
Fri Nov  4 12:01:33 2016 TUN/TAP device tun1 opened
Fri Nov  4 12:01:33 2016 TUN/TAP TX queue length set to 100
Fri Nov  4 12:01:33 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Nov  4 12:01:33 2016 /sbin/ip link set dev tun1 up mtu 1500
Fri Nov  4 12:01:33 2016 /sbin/ip addr add dev tun1 local 10.211.1.9 peer 10.211.1.10
Fri Nov  4 12:01:33 2016 /sbin/ip route add 210.191.124.213/32 via 192.168.1.1
Fri Nov  4 12:01:33 2016 /sbin/ip route add 0.0.0.0/1 via 10.211.1.10
Fri Nov  4 12:01:33 2016 /sbin/ip route add 128.0.0.0/1 via 10.211.1.10
Fri Nov  4 12:01:33 2016 Initialization Sequence Completed
Fri Nov  4 12:03:05 2016 event_wait : Interrupted system call (code=4)
Fri Nov  4 12:03:05 2016 /sbin/ip route del 210.191.124.213/32
Fri Nov  4 12:03:05 2016 /sbin/ip route del 0.0.0.0/1
Fri Nov  4 12:03:05 2016 /sbin/ip route del 128.0.0.0/1
Fri Nov  4 12:03:05 2016 Closing TUN/TAP interface
Fri Nov  4 12:03:05 2016 /sbin/ip addr del dev tun1 local 10.211.1.9 peer 10.211.1.10
Fri Nov  4 12:03:05 2016 SIGINT[hard,] received, process exiting
+ echo ''

+ exit 1

At this point: Initialization Sequence Completed looks like it's connected ok, but later this: Fri Nov 4 12:03:05 2016 event_wait : Interrupted system call (code=4)

Anyway after trying to update the cfg files, when trying to connect or just testing with test_availability, it deletes some of those files so I still can't connect anywhere :/

Thank you

vmotos commented 7 years ago

There is a problem for connecting to that VPNGate peer... when the message "[+] There is a problem starting openvpn. Please, check nohup.out for details" appears is because of the tun interface has not up. Please, try to change the provider to vpnbook and test again.

zpol commented 7 years ago

SOLVED