11

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:

  1. connect to the the Wifi
  2. try browsing some http:// site
  3. 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.

2
  • If you open Google Chrome, you should be directed to gstatic.com/generate_204 which will open network login page.
    – Kulfy
    Jun 13 '18 at 20:07
  • @Kulfy nope that doesn't help. Now I'm in Chrome getting "This site can’t be reached gstatic.com’s server IP address could not be found."
    – Bastian
    Jun 14 '18 at 9:28
7

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.

1
  • This adding google's DNS manually worked for me on a "captiveportal-login.example.com".
    – joshperry
    Jun 20 '18 at 0:13
5
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.)

1
  • Thanks -- the 'Connectiviry Checking -> Off' toggle just helped me. Aug 15 '19 at 18:43
1

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?

1

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

0

I ran into this issue recently and I'm not sure what exactly caused it, but the suggestion to try browsing to the captive portal IP knocked something lose in my brain. At first I tried pinging an external IP ping 8.8.8.8 but the network security team has properly locked that down. Then I ran ip route to see what IP I had been assigned and tried accessing the default gateway via https, but I got a message that there was an empty response which at least proved to me that there was a server listening, and when I switched to http it correctly bounced me to the captive portal login page.

The quick way to try this is xdg-open http://$(ip --oneline route get 8.8.8.8 | awk '{print $3}'). This finds the default gateway and prints it's IP and then tries opening it in your default browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.