During the installation of Kali I skipped the network section which I couldn’t fill out at the time. Now in Kali I can connect to the WiFi but can not do anything on the internet like web browsing. I have already tried updating my distros and using service network-manager restart but that raises another error. How do I go about fixing this?
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.– Community BotCommented Jun 1, 2022 at 11:38
-
attach a screenshot, please– Vad SimCommented Jun 1, 2022 at 11:59
-
Obligatory reading: unix.meta.stackexchange.com/a/5362/108618– ChanganAutoCommented Jun 1, 2022 at 14:27
5 Answers
There is an error with DNS server. To fix:
Open the terminal. Then write:
sudo rm /etc/resolv.conf
echo 'nameserver 8.8.8.8' | sudo tee /etc/resolv.conf >/dev/null
Then reboot the computer.
Hope this helps.
I hope i can help you but i can't promise anything.
( copy with ctrl+'c' paste with ctrl+shift+'v' cause ctrl+something in the terminal is a command to interact with programs running in the terminal )
go open your terminal and type: ping google.com
if the output says something like: "ping: google.com: Temporary failure in name resolution"
follow this steps:
- first we are going to open the resolv.conf file with
sudo nano /etc/resolv.conf
- then type
"nameserver 8.8.8.8"
- press enter to use the next line
- type
"nameserver 8.8.4.4"
- press ctrl + 'x'
- press 'y'
- press enter (return)
- type
sudo systemctl restart systemd-resolved.service
then we will restart the network manager cause it may solve some problems :)
- type (still in terminal)
sudo service NetworkManager restart
- it may cause an error that says something like
did not find service NetworkManager
if so: instead ofNetworkManager
usenetwork-manager
. If this also throws an error then idk maybe i f**** up lmao.
finally we type ping google.com
again, should be working now. If it doesn't, i am sry i can't help.
some other stuff:
RUN THIS ON YOUR TERMINAL
- systemctl enable systemd-networkd
- systemctl enable systemd-resolved
- systemctl start systemd-networkd
- systemctl start systemd-resolved
- ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
- service resolvconf restart
- service network-manager restart
- ping google.com
DISCLAIMER:
the other stuff did not work for me but maybe for u idk
I once had this issue with a previous version of Kali Linux. What I did to fix it was I just reinstalled it.
It might seem like not a good idea but backup your files and reinstall.
Hope this helps!
Open Terminal on Kali Linux and type:
ping 8.8.8.8
If the out is "destination host unreachable", then do the following commands:
sudo dpkg-reconfigure wireshark-common
usermod -a -G wireshark <user>
If you got different output or it still doesn't work, then type:
ping google.com
And if the output is "Temporary failure in name resolution", then:
sudo service firewalld stop
sudo iptables --flush
/sbin/iptables -t nat -A POSTROUTING -s 10.42.0.0/24 -o wlan0 -j MASQUERADE
The first problem occurred because DNS Resolver doesn't work right. It should convert ip-address(8.8.8.8) to a domain name(google.com). "8.8.8.8 and google.com is basically the same".
The second problem occurred because of the same reason, but other way around.
What worked for me, is I downloaded systemd-resolved from official debian repo. Installed and set up DNS to 8.8.8.8 and 8.8.4.4, then wifi started working for me. Hope it helps!
-
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.– Community BotCommented Jun 19, 2023 at 10:33
-