Jump to content

Kali Linux cannot reach internet


AirCooledFury
 Share

Recommended Posts

Hello everyone. First post on here so bear with me. I am a cyber security student trying to learn to use kali and linux in general, and I have a problem with wifi. I have dual booted Kali with windows 8.1, and I cannot use the internet when I boot into kali. I get an ip address from my router's dhcp, I can ping addresses outside the network, like 8.8.8.8, but I cannot connect to any web pages. I need to connect while I work on kali for school work. Anybody know whats going on? Thanks in advance.

Link to comment
Share on other sites

You should've been given the DNS server from the DHCP response that gave you your IP.

You're supposed to end up with a /etc/resolv.conf file which contains at least 1 entry for a nameserver which would point to the DNS server for the network. Check the man pages for either dhcpcd and/or resolvconf (the latter may not have been installed).

Link to comment
Share on other sites

Ok so what should the address in resolv.conf say? Because it just gives the loop back address.

While the issue is resolved, just to answer this question for future reference:

None of us would know, that'd be based entirely on your setup at home.

Link to comment
Share on other sites

Ok so just to be more clear the issue is not resolved. I just responded ambiguously. What I meant to say was, the resolv.conf file lists my gateway address as the nameserver. I still cannot connect to any website. It is a wireless network using WPA2 - PSK security, on a belkin dual band n750 router. The network is pretty simple, a class C using 192.168.2.0 for the network with the gateway at 192.168.2.1. It uses automatic DHCP addressing. All the other machines on the network are running windows 8.1 except a few mobile devices. The kali machine I'm trying to fix has been dual booted with windows 8.1 on an HP laptop. On my kali machine, I noticed the ping is taking an unusually long time, like 67ms, and if I use the traceroute command, it gets to its destination but takes like 175ms per hop and the whole process lasts like 10 minutes. If I try to get to a website by putting it's IP address directly into the browser, I see the site name come up at the top of the browser window, but it just hangs there with a white display. Putting in a normal website name like www.google.com just causes a cannot find server error.

Link to comment
Share on other sites

In /etc/resolv.conf there should be a line that reads "nameserver [iP]" where [iP] is currently the IP of the gateway. This implies that the gateway is acting as DNS server for your network. It would appear that gateway is reluctant to fulfill this role which may very well also be the cause of the slow traceroute.

Replace that [iP] value with 8.8.8.8 and then try accessing stuff again (restart the browser to make sure it uses the new value). If this works, your problem is the gateway not fulfilling its DNS role and you should look there for answers.

Link to comment
Share on other sites

Ok so I tried setting resolv.conf to 8.8.8.8 and the result is the same. Another curious note is that when I use wireshark on my wlan0 interface the traffic shows the router repeatedly asking who is at my address, that is, the one assigned to kali on this machine. My machine replies and my router just asks again and again as long as I try to send packets. Is this normal? Also, could it be that my router doesn't like linux?

Link to comment
Share on other sites

Update: I took wlan0 interface off the list in /etc/network/interfaces because I read that network manager will not manage interfaces listed there. Now when I try to ping google.com I get a reply. But when I try to go there in my browser it redirects me to charter search(charter is my ISP) and hangs with a white screen.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...