You are not logged in.

#1 2019-10-05 04:06:31

1ptb3b
Member
Registered: 2017-01-17
Posts: 28

How to debug captive portal at Starbucks [SOLVED]

Hello. I can't connect to the internet at Starbucks. I'm using my phone as a hotspot right now.

Any tips on how to begin debugging this? The captive portal window triggers, but it fails to load anything. All I see is this error.

Error resolving “aruba.odyssys.net”: Name or service not known

When I was installing GNOME, I installed the `networkmanager` package with pacman. I also enabled these services.

systemctl enable dhcpcd.service
systemctl enable systemd-resolved.service
systemctl enable NetworkManager.service

I symlinked `/etc/resolv.conf` like this. (Not sure if I have to do this or why. Some explanation of this step would be appreciated.)

/etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf

$ cat /etc/resolv.conf
# Generated by resolvconf
domain home
nameserver 208.67.222.222
nameserver 208.67.220.220

I checked systemd-resolve status with this.

systemctl status systemd-resolved.service

Seems like it's running fine.

I think the captive portal domain is resolving... This is what drill says.

$ drill aruba.odyssys.net
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 2584
;; flags: qr aa rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; aruba.odyssys.net.	IN	A

;; ANSWER SECTION:
aruba.odyssys.net.	0	IN	A	172.31.98.1

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 6 msec
;; SERVER: 208.67.220.220
;; WHEN: Fri Oct  4 20:58:31 2019
;; MSG SIZE  rcvd: 51

Ping just stays stuck. I can't reach anything it seems.

$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

This is what resolvectl says.

$ resolvectl status
Global
       LLMNR setting: yes
MulticastDNS setting: yes
  DNSOverTLS setting: no
      DNSSEC setting: allow-downgrade
    DNSSEC supported: no
Fallback DNS Servers: 1.1.1.1
                      9.9.9.10
                      8.8.8.8
                      2606:4700:4700::1111
                      2620:fe::10
                      2001:4860:4860::8888
          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 2 (wlp2s0)
      Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
DefaultRoute setting: yes
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: allow-downgrade
    DNSSEC supported: no
  Current DNS Server: 172.20.10.1
         DNS Servers: 172.20.10.1
                      fe80::ccb:d5ba:c34:a587
          DNS Domain: ~.

Seems like I am able to reach the captive portal server, if I plug in the IP.

$ telnet 172.31.98.1 443
Trying 172.31.98.1...
Connected to 172.31.98.1.
Escape character is '^]'.

Last edited by 1ptb3b (2019-10-26 00:19:15)

Offline

#2 2019-10-05 04:53:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,113
Website

Re: How to debug captive portal at Starbucks [SOLVED]

1ptb3b wrote:

When I was installing GNOME, I installed the `networkmanager` package with pacman. I also enabled these services.

systemctl enable dhcpcd.service
systemctl enable systemd-resolved.service
systemctl enable NetworkManager.service

Why have you enabled more than one service?
https://wiki.archlinux.org/index.php/Ne … orkManager


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-10-05 05:13:23

1ptb3b
Member
Registered: 2017-01-17
Posts: 28

Re: How to debug captive portal at Starbucks [SOLVED]

> Why have you enabled more than one service?

Because I don't know what I'm doing. I thought I needed all of them. smile

I thought I needed NetworkManager.service because I'm using GNOME and I thought that was a dependency to use the wifi menu.

I thought I needed dhcpcd.service because I thought this was necessary for my router to give me an IP.

I thought I needed systemd-resolved.service because I thought I needed that to resolve DNS.

Which ones should I disable if I want to keep things mostly systemd?

Last edited by 1ptb3b (2019-10-05 05:17:03)

Offline

#4 2019-10-05 05:16:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,113
Website

Re: How to debug captive portal at Starbucks [SOLVED]

Read the link I posted. The wiki documentation is to be preferred over guesswork.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2019-10-05 06:02:38

1ptb3b
Member
Registered: 2017-01-17
Posts: 28

Re: How to debug captive portal at Starbucks [SOLVED]

Cool, thanks for the link. Reading through some different sections in that wiki, it seems like NetworkManager can use systemd-resolved by symlinking the right files, which I've done. So that part seems fine.

Skimming through some different sections, I found something about dhcp.

I disabled the dhcp service and enabled networkd because by default NetworkManager will use its internal DHCP client, based on systemd-networkd.

sudo systemctl stop dhcpcd.service
sudo systemctl disable dhcpcd.service

systemctl enable systemd-networkd.service
systemctl start systemd-networkd.service

However, these changes have had zero effect on the captive portal DNS problem. I rebooted my computer and checked that systemd-networkd, NetworkManager, and systemd-resolved are indeed running. But I still can't resolve the captive portal domain.

Last edited by 1ptb3b (2019-10-05 06:33:59)

Offline

#6 2019-10-05 08:02:43

1ptb3b
Member
Registered: 2017-01-17
Posts: 28

Re: How to debug captive portal at Starbucks [SOLVED]

Oooh. Waaait. I've been rerererererereading the wiki.

I think I only need this.

systemctl enable NetworkManager.service

NetworkManager can handle DNS and DHCP all by itself.

Optionally, I could have NetworkManager use systemd-resolved as its DNS backend. For that I would have to enable systemd-resolved.service and symlink /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf.

On the other hand, it seems like networkd is an alternative to NetworkManager. The only DHCP clients that NetworkManager can use are  dhclient, dhcpcd, and internal. If I wanted to set a custom client, then I would have to set it explicitly.

# /etc/NetworkManager/conf.d/dhcp-client.conf
[main]
dhcp=dhclient

I need to go back to that Starbucks and try again with only NetworkManager.service running.

Offline

#7 2019-10-05 12:44:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,271
Website

Re: How to debug captive portal at Starbucks [SOLVED]

Once your networking is back to a sane configuration, you'll likely still have problems.  Starbucks's captive portal is known to be a ridiculous PITA:
https://bbs.archlinux.org/viewtopic.php?pid=1823592


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2019-10-26 00:18:56

1ptb3b
Member
Registered: 2017-01-17
Posts: 28

Re: How to debug captive portal at Starbucks [SOLVED]

Okay, back at this Starbucks. Captive portal works!!! I think the problem was mixing NetworkManager and systemd stuff.

sudo systemctl disable systemd-{resolved,networkd}.service
sudo systemctl stop systemd-{resolved,networkd}.service

And then rebooting ended up fixing this issue for me!

Offline

Board footer

Powered by FluxBB