How to solve connected but no internet issues in kali linux?

 How to solve connected but no internet issues in kali linux?

We may have faced this issue multiple times. The issue may have arise due to multiple reasons which can be troubleshoot using various ways. The way I find easier when we are connected to network but still having problem using internet is described step by step below.

Step 1: First, ensure that you are connected to network and then try to ping your gateway. To find your gateway, you can open terminal by typing terminal in search or can use shortcut as CTRL+ALT+T. Then type command: route -n


Then ping your gateway, if you are able to ping it, you are connected to the network.

Command: ping <your_gateway_ip>


Step 2: Then try to ping google.com. If it gives results as ping: google.com: Name or service not know, try ping 8.8.8.8, 8.8.8.8 is the primary DNS server for Google DNS. If ping starts for 8.8.8.8, congratulations!, we are on right track. If it doesn't ping 8.8.8.8, this method does not works any further for you.


Step 3: You can now edit /etc/resolv.conf file using any preferable text editor like nano, vim etc. You need to add nameserver 8.8.8.8 in that file as show in below figure. Command to edit file: vi /etc/resolv.conf


Note:  You need to press i after resolve.conf file is opened. It enable you to insert text in the file. After writing or editing file, you need to press ESC key and then type following thing :wq! and press enter.

Step 4: Now again, try to ping google.com. It starts to ping google and even you can browse content in browser i.e. your are connected to internet. :)


 Conclusion:

It works for those problem where the connection is able to ping 8.8.8.8 but is not able to ping google.com and access content in browser. If your connection is not able to ping 8.8.8.8, we need to go through different solutions.

If you got any queries, please feel free to comment down below. Thank you!

No comments