LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 07-26-2019, 08:54 PM   #1
Terje
Member
 
Registered: May 2004
Location: My own little world...
Distribution: Linux Mint, Slackware, et al
Posts: 65

Rep: Reputation: 16
Question Wifi Connects To Hotspot, But No Internet With Linux Mint 18.3


Hello.

I've encountered a problem that sounds similar to others I've been reading about for the past two days, in various forums, but I haven't found a solution that works, so now I'll ask before I start rooting around and break something.

I use mobile broadband for internet access. My desktop can access the internet via the hotspot under both Slack64 v14.1 and Win7 using all of the same hardware. My laptop can do the same under Slack64 v14.2 and Win10, but not under Linux Mint 18.3. If I connect (USB) the hotspot to the laptop, then everything works fine. I've gone back and forth comparing all of the various settings that I can find, and everything seems to match between all five. The wifi from both machines connects just fine to the hotspot, but Linux Mint can't even ping anything beyond itself (at the address assigned by the hotspot). I'm guessing there's a setting or a config file or something along those lines that I've missed.

Any help is greatly appreciated.
 
Old 07-27-2019, 03:32 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Usual things are
  1. Default route is not set correctly. It should be your internet point.
  2. Your search path in /etc/resolv.conf for dns is silly. The common thing is to set the internet point as the search path, which presumes the modem passes dns servers on. The usb connection may not. So put in a few dns servers like opendns.org's ones
 
Old 07-27-2019, 09:38 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,326
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
I find this intriguing. I can't think of any really good diagnostic questions to ask, so I'll fall back to basics.

Could you provide more information about this hotspot of which you speak? Is it your mobile phone? If so, does it offer the option of a WiFi hotspot and have you tried using that instead of the USB hotspot?

What is the output of ip addr or ifconfig -a on the Mint install? (Please be sure to surround any terminal output with "code" tags, which become available when you click the "Go Advanced" button beneath the compose post window.)

Could you post the output of the ping you mention?

Also, could you try these commands and post the output?

Code:
ping google.com
ping 8.8.8.8
traceroute google.com
traceroute 8.8.8.8
 
Old 07-28-2019, 01:23 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
Originally Posted by frankbell
I find this intriguing. I can't think of any really good diagnostic questions to ask, so I'll fall back to basics.
It's ok, frankbell. I've been down this road. He has to check routing and resolv.conf. I've seen what systemd/networkmanager does to Mint (=99% Ubuntu)

Good diagnostics questions might be:
  1. Explain your hotspot (like frankbell said)
  2. Post the output of "sudo /sbin/route"
  3. Post the output of "cat /etc/resolv.conf"
 
Old 07-28-2019, 09:34 PM   #5
Terje
Member
 
Registered: May 2004
Location: My own little world...
Distribution: Linux Mint, Slackware, et al
Posts: 65

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by business_kid View Post
<snip>
Good diagnostics questions might be:
  1. Explain your hotspot (like frankbell said)
  2. Post the output of "sudo /sbin/route"
  3. Post the output of "cat /etc/resolv.conf"
1. I use mobile broadband to access the internet. My hotspot is basically a cellphone that makes the connection possible.
2. Output of the route command:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    600    0        0 wlp1s0
link-local      *               255.255.0.0     U     1000   0        0 wlp1s0
192.168.0.0     *               255.255.255.0   U     600    0        0 wlp1s0
3. Contents of /etc/resolv.conf
Code:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
Even though the hotspot clearly shows that a connection has been made, and has assigned an IP address to the laptop, I cannot even ping the gateway (192.168.0.1) much less anything beyond it.
 
Old 07-29-2019, 04:25 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
Originally Posted by Terje
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
Hmmmph! That's it. 127.0.0.1 is your own box, when it should be a dns server. You have no dns. To try, Hack it by hand despite what they say. It will be overwritten next reboot, but no matter. Take out 127.0.0.1 and put in
nameserver 208.67.222.222
nameserver 208.67.220.220

which uses opendns.org. See if you have internet then. You could also try
nameserver 192.168.0.1

which uses your phone's dns. Then I would try 'man resolveconf' and/or 'man resolver' and see if you can figure out where to configure this stuff.

I also did a search for 'Ubuntu set dns nameservers' and discovered that half of their users have had this problem.
 
Old 07-30-2019, 02:30 AM   #7
Terje
Member
 
Registered: May 2004
Location: My own little world...
Distribution: Linux Mint, Slackware, et al
Posts: 65

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by business_kid View Post
<snip>
You could also try
nameserver 192.168.0.1

which uses your phone's dns. Then I would try 'man resolveconf' and/or 'man resolver' and see if you can figure out where to configure this stuff.

I also did a search for 'Ubuntu set dns nameservers' and discovered that half of their users have had this problem.
I managed to find the files that Network Manager uses to determine what gets written into /etc/resolv.conf, and editing one of those files resulted in /etc/resolv.conf consistently reading:
Code:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
###Below this added by me###
nameserver 192.168.0.1
###Above this added by me###
nameserver 127.0.0.1
That being said, I still cannot ping even the gateway, only the machine itself. The information is now there, and I've double-checked that everything is "spelled" correctly, so there is still something wonky elsewhere. The two other OSs on the same machine are able to connect without a hitch, so it is definitely something specific to Linux Mint, but I don't know where else to look for the problem. I think I'm about done with Linux Mint, if it's going to be this much trouble.
 
Old 07-30-2019, 04:24 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
So your gateway isn't passing dns. Instead of 192.168.0.1, put in the 2 opendns servers i gave you in the previous post
 
Old 07-30-2019, 04:42 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,710

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
Mint uses dnsmasq as a DNS cache which is why the resolv.conf has 127.0.0.1 instead of an actual DNS server. If you cant ping the IP address of your gateway then something else is wrong. The route table looks ok.

Is dnsmasq running?

Last edited by michaelk; 07-30-2019 at 04:43 AM.
 
Old 07-30-2019, 11:51 AM   #10
Terje
Member
 
Registered: May 2004
Location: My own little world...
Distribution: Linux Mint, Slackware, et al
Posts: 65

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by michaelk View Post
Mint uses dnsmasq as a DNS cache which is why the resolv.conf has 127.0.0.1 instead of an actual DNS server. If you cant ping the IP address of your gateway then something else is wrong. The route table looks ok.

Is dnsmasq running?
Thanx! I'm not used to dnsmasq, so I wasn't even thinking about it. Uncommenting a single line in /etc/dsnmasq.conf seems to have fixed things, because I'm posting this from the Linux Mint side of my laptop. The line I uncommented was:
Code:
server=/localnet/192.168.0.1
I'm going to test drive it for a bit before marking this thread "Solved."
 
Old 07-30-2019, 04:15 PM   #11
Terje
Member
 
Registered: May 2004
Location: My own little world...
Distribution: Linux Mint, Slackware, et al
Posts: 65

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Terje View Post
<snip>
I'm going to test drive it for a bit before marking this thread "Solved."
Well, I've been playing with it for the past four hours or so, and the internet connection works, even without any action on my part after a reboot. There have been a couple of hiccups, however. I've had to restart Network Manager three times because I lost connection to the internet. The laptop stayed connected to the hotspot the entire time, but it revert to not being able to ping it again until after restarting Network Manager. I don't know what might've caused the connection to drop. My first thought is that dnsmasq stopped for some reason, but I don't know enough about it to know if that makes sense, much less what to do about if it does. Restarting only dnsmasq doesn't seem to work, but restarting Network Manager does.

Last edited by Terje; 07-30-2019 at 08:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can connect to cellphone through WIFI HOTSPOT, but cannot connect to my own WIFI network diegoandresalvarez Linux - Networking 7 10-22-2016 11:54 AM
Want to share my wifi by creating a wifi hotspot ( While staying connected to wifi)? shadyXV Linux - Desktop 4 07-20-2015 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 08:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration