Cannot reach public WIFI login page in Ubuntu 18.04 Captive Portal Issue
I'm sorry if this appears to be the tenth duplicate, but none of the answers provided in the other cases resolved my problem.
I'm attempting to use a public WIFI just as I successfully did two days ago. The normal procedure is:
- connect to the the Wifi
- try browsing some http:// site
- get forwarded to that splash screen where a "connect to the internet" button needs to be pressed
Now I don't get beyond step 2 any more. I'm on a dual-boot machine. I can access the internet fine using Widows 10, but not Ubuntu 18.04.
On windows I get:
SSID: SEC Wi-Fi
Protocol: 802.11n
Security type: Open
Network band: 2.4 GHz
Network channel: 6
IPv4 address: 192.168.33.154
IPv4 DNS servers: 192.168.0.1
192.168.0.1
Manufacturer: Intel Corporation
Description: Intel(R) Dual Band Wireless-AC 7260
Driver version: 17.15.0.5
Physical address (MAC): 0C-8B-FD-75-00-D5
Windows IP Configuration
Host Name . . . . . . . . . . . . : DESKTOP-G83LKQ1
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : fdxtended.com
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : fdxtended.com
Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 7260
Physical Address. . . . . . . . . : 0C-8B-FD-75-00-D5
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::656c:ef48:d71c:420e%17(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.33.154(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.128.0
Lease Obtained. . . . . . . . . . : Wednesday, 13 June 2018 17:17:44
Lease Expires . . . . . . . . . . : Wednesday, 13 June 2018 23:18:53
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DHCPv6 IAID . . . . . . . . . . . : 286034941
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-A4-A4-F1-A0-D3-C1-9C-CD-E0
DNS Servers . . . . . . . . . . . : 192.168.0.1
192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
In Linux I get:
ifconfig
:
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.33.154 netmask 255.255.128.0 broadcast 192.168.127.255
inet6 fe80::499:60a3:aae7:a075 prefixlen 64 scopeid 0x20<link>
ether 0c:8b:fd:75:00:d5 txqueuelen 1000 (Ethernet)
RX packets 33578 bytes 19389454 (19.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 23622 bytes 3363483 (3.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
systemd-resolve --status
:
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 3 (wlo1)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 192.168.0.1
DNS Domain: fdxtended.com
curl -v example.com
:
* Rebuilt URL to: example.com/
* Could not resolve host: example.com
* Closing connection 0
curl: (6) Could not resolve host: example.com
Any hints on how to gain internet access? I would really appreciate it.
Edits
So, basically, Ubuntu blocks all redirects. I started a more precise question here: DNS forwarding blocked in specific WIFI
(Un)fortunately I'm not any more in the location of the mentioned WIFI meaning that for now I cannot test and thus accept any of the answers replies below.
I had the same problem.
- Internet was not working
- Captive Login Page did not show up automatically
- Wifi icon was a question mark ( ? )
I managed to login by visiting the login page at: https://1.1.1.1/login.html
Once logged in, I was in the same situation as before, but then the problem was only DNS:
-
curl -v example.com
returned, after some time, "Could not resolve host: example.com". - Good news: I could succesfully ping Google DNS 8.8.8.8 with
ping 8.8.8.8
I added 8.8.8.8 to the DNS server list for my WiFi connection, via the following steps:
- Click on the WiFi icon (mine was a question mark, because WiFi was not working)
- Click on the WiFi network name, then Wifi Settings, then the wheel close to my WiFi network, then IPv4 tab
- Wrote 8.8.8.8 in the DNS text box (leave "Automatic" DNS switched on)
- Apply changes
- Restart network manager:
sudo service network-manager restart
And it worked for me.
systemd-resolve --status
now returns two DNS Servers for the WiFi connection, the first one is the DNS assigned by the network, the second one is 8.8.8.8
I hope this can help.
Internet was not working
Captive Login Page did not show up automatically. No browser shows that page.
Wifi icon was a question mark ( ? )
The following helped me solve this problem on a standard Ubuntu 18.04 installation.
Solution 1:
Settings > Privacy > Connectivity Checking > Off.
The above is enough to show the captive log-in page for many wifi networks. Some however (e.g. gwr on-train wifi) also require solution 2:
Settings > Wi-Fi > select the settings (click the cog icon) for the network you are trying to reach. Select the IPv6 tab. For IPv6 method select 'Automatic, DHCP only' (instead of the default setting 'Automatic'). Click Apply.
It may also help to do:
Settings > Network > Network Proxy - Off. (Click on the settings button with the cog icon on it.)
Easiest solution for me:
Add the following to /etc/NetworkManager/NetworkManager.conf :
[connectivity] uri=http://start.ubuntu.com/connectivity-check.html response=Lorem ipsum
See: https://lists.ubuntu.com/archives/ubuntu-desktop/2012-July/003886.html
The problem is caused by the resolved daemon introduced in 17.04. This breaks the forwarding in wifi captative pages. The solution presented here does NOT rely on Googles name servers. The solution is replacing resolved with dnsmasq, as was used before, and can be found here:
How to disable systemd-resolved and resolve DNS with dnsmasq?