Networking

Frequency

New Member
Joined
Jul 11, 2023
Messages
7
Reaction score
0
Credits
43
I'm having an issue with my Linux machine, i can connect to my phone hotspot but can't ping any nameserver or Google, please i need help.
 


I'm having an issue with my Linux machine, i can connect to my phone hotspot but can't ping any nameserver or Google, please i need help.
Try a ping to 8.8.8.8 and see what you get. I can help once we know where to look.
 
Try a ping to 8.8.8.8 and see what you get. I can help once we know where to look.
IMG_20230712_061947_778.jpg
 
looks like no reply at all. yes making a song reference. I have seen this before with hotspots. you need to make sure you are connected to the hotspot. keep in mind that the hotspots usually turn off if not actively running data in a couple minutes. so check the phone hotspot setting there.
next go into a terminal and type "ifconfig" and locate your network adapter in all the crap that comes up. what you want is to find the assigned ip address. that is 4 sets of numbers separated by dots. if you see something starting with 169 then your hotspot is not giving us an ip address. or if it is all 0's
if possible check to see what ip addresses are being given out by your phone. You may or may not be able to find this in your settings but it is referred to as a "dhcp pool". You would recognize this sort of thing on most computers you find your ip address as something like 192.168.1.15
 
What is the exact output when you try to ping Google?

More specifically, does it get far enough to show an IP address or does it just fizzle out and throw an error about the connection?
 
What happens when you ping the gateway?
 
should look something like the below...

64 bytes from 8.8.8.8: icmp_seq=7 ttl=119 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=119 time=22.8 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=119 time=22.5 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=119 time=22.2 ms
64 bytes from 8.8.8.8: icmp_seq=11 ttl=119 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=12 ttl=119 time=22.5 ms
64 bytes from 8.8.8.8: icmp_seq=13 ttl=119 time=21.8 ms
64 bytes from 8.8.8.8: icmp_seq=14 ttl=119 time=21.8 ms
64 bytes from 8.8.8.8: icmp_seq=15 ttl=119 time=22.8 ms
64 bytes from 8.8.8.8: icmp_seq=16 ttl=119 time=22.8 ms
64 bytes from 8.8.8.8: icmp_seq=17 ttl=119 time=21.9 ms
64 bytes from 8.8.8.8: icmp_seq=18 ttl=119 time=21.8 ms
64 bytes from 8.8.8.8: icmp_seq=19 ttl=119 time=21.8 ms
64 bytes from 8.8.8.8: icmp_seq=20 ttl=119 time=21.8 ms
 
In my mind I start working my way outward. You have established you cant make it to google. Here is what I would do
1. do the command "ip a" to obtain your interface IP
2 ping your own interface
3. do the command "route -n" to get your gateway
4. ping the gateway.
5. If all of that works you can try a traceroute to the google dns IP and see how far that gets

Based on the failure I'm guessing you are probably not getting past your gateway. You might also try connecting anything else to your hotspot and see if that works. if you can connect the system not getting to the public internet to any other working Internet connection that would also either eliminate or point the finger at the pc.

Good luck
 
Some more information would be helpful.

Android or iphone?
How is the phone tethering connection with the computer been establishedi? Wireless or usb?

Has tethering been activated in the phone?

What network tools are being used? NewtworkManager, wpa_supplicant, or something else?

If it's NetworkManager, does it identify the phone as a network connection?

If tethering is established, running:
Code:
ip a
would show either the phone as a wireless interface, maybe like w###, or a usb device maybe like /dev/usb#, (where # is some alphanumeric).
 
looks like no reply at all. yes making a song reference. I have seen this before with hotspots. you need to make sure you are connected to the hotspot. keep in mind that the hotspots usually turn off if not actively running data in a couple minutes. so check the phone hotspot setting there.
next go into a terminal and type "ifconfig" and locate your network adapter in all the crap that comes up. what you want is to find the assigned ip address. that is 4 sets of numbers separated by dots. if you see something starting with 169 then your hotspot is not giving us an ip address. or if it is all 0's
if possible check to see what ip addresses are being given out by your phone. You may or may not be able to find this in your settings but it is referred to as a "dhcp pool". You would recognize this sort of thing on most computers you find your ip address as something like 192.168.

looks like no reply at all. yes making a song reference. I have seen this before with hotspots. you need to make sure you are connected to the hotspot. keep in mind that the hotspots usually turn off if not actively running data in a couple minutes. so check the phone hotspot setting there.
next go into a terminal and type "ifconfig" and locate your network adapter in all the crap that comes up. what you want is to find the assigned ip address. that is 4 sets of numbers separated by dots. if you see something starting with 169 then your hotspot is not giving us an ip address. or if it is all 0's
if possible check to see what ip addresses are being given out by your phone. You may or may not be able to find this in your settings but it is referred to as a "dhcp pool". You would recognize this sort of thing on most computers you find your ip address as something like 192.168.1.15
My phone give me ip address, starting with 192
 
In my mind I start working my way outward. You have established you cant make it to google. Here is what I would do
1. do the command "ip a" to obtain your interface IP
2 ping your own interface
3. do the command "route -n" to get your gateway
4. ping the gateway.
5. If all of that works you can try a traceroute to the google dns IP and see how far that gets

Based on the failure I'm guessing you are probably not getting past your gateway. You might also try connecting anything else to your hotspot and see if that works. if you can connect the system not getting to the public internet to any other working Internet connection that would also either eliminate or point the finger at the pc.

Good luck
I connected my hotspot to my friend Linux system and it worked, i think I have DNS problem
 
i believe if this were just a dns issue, you would still be able to ping 8.8.8.8 successfully. in post #3 you weren't able to. has that changed? if you still can't do that:
5. If all of that works you can try a traceroute to the google dns IP and see how far that gets
 
My phone give me ip address, starting with 192
It looks like everything is working. you can ping the gateway and you are getting DNS resolution according to the ping for google. This leaves the issue on your phone. You can confirm this by connecting to another wifi network assuming you can move the computer in question.
At this point the problem is in the hotspot. Something I have seen before but now you are left dealing with your wireless carrier. If you are using only this one computer you should try USB tethering instead of hotspot. This limits your hotspot to just the one device but if that is all you are using then no issue. You may also try the USB tethering to prove it is your phones wifi hotspot. I have not figured out why but hotspots act funny especially on linux. You will need a USB data cable not just a charging cable. Most of the time your charging cable handles data too so use that first. Put your phone to USB Tether and plug into your PC. It should see the phone like a network adapter and allow you to go online. You can test with the ping or a browser.
 

Members online


Top