[SOLVED] Wifi Connects To Hotspot, But No Internet With Linux Mint 18.3
Linux MintThis forum is for the discussion of Linux Mint.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Default route is not set correctly. It should be your internet point.
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
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?
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)
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.
# 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.
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.
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.
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."
<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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.