使用 Ubuntu 18.04 无法使用许多公共 Wifi

使用 Ubuntu 18.04 无法使用许多公共 Wifi

这一问题似乎有很多不同的表现形式。

使用我的 Ubuntu 18.04.3 LTS 时,我很少能够使用公共 Wifi,因为我无法连接到强制门户进行登录/“单击连接”。

在 KDE 网络选项卡中,我可以连接到这样的公共无线网络。它在选项卡中显示为已连接(Wifi 符号,没有小问号)。但是,我无法解析公共 Wifi 网络中的任何内容。如果我在 chromium、chrome 或 Firefox 中输入任何内容,我都会得到DNS_PROBE_FINISHED_NO_INTERNET

curl看起来像这样...

curl -v google.com
* Rebuilt URL to: google.com/
* Could not resolve host: google.com
* Closing connection 0
curl: (6) Could not resolve host: google.com

...ping像这样。

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
22 packets transmitted, 0 received, 100% packet loss, time 21325ms

一切在 iPhone、Android 和 Windows10 上均顺利运行。

在您将其标记为重复之前;我找到了下面提到的解决方案。不幸的是,它们对我都不起作用。它们出现在不同的线程中,但我认为基本上有 4 个:

ifconfig

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.23.105.183  netmask 255.255.254.0  broadcast 10.23.105.255
        inet6 fe80::e275:f0ba:2953:9649  prefixlen 64  scopeid 0x20<link>
        ether b4:6d:83:cd:7e:9a  txqueuelen 1000  (Ethernet)
        RX packets 50246  bytes 14090564 (14.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35844  bytes 5616976 (5.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

systemd-resolve --status

Global
         DNS Servers: 8.8.8.8
          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 (wlp3s0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 8.8.8.8
          DNS Domain: ~.
                      client.m3-hotspots.de

...

更新

我又坐上了一辆德国火车,正如 waltinator 所评论的那样,我尝试了 curl 和 pingdetectportal.firefox.com184.150.154.24 detectportal.firefox.com添加后/etc/hostsping 没有成功,curl 返回 302 未找到。我journalctl -f /usr/sbin/NetworkManager一边尝试连接一边观察。

Dez 23 14:00:35 uranus NetworkManager[878]: <info>  [1577106035.2216] manager: NetworkManager state is now CONNECTED_LOCAL
Dez 23 14:00:35 uranus NetworkManager[878]: <info>  [1577106035.2285] manager: NetworkManager state is now CONNECTED_SITE
Dez 23 14:00:35 uranus NetworkManager[878]: <info>  [1577106035.2286] policy: set 'WIFIonICE' (wlp3s0) as default for IPv4 routing and DNS
Dez 23 14:00:35 uranus NetworkManager[878]: <info>  [1577106035.2308] device (wlp3s0): Activation: successful, device activated.
Dez 23 14:00:35 uranus NetworkManager[878]: <info>  [1577106035.2317] manager: NetworkManager state is now CONNECTED_GLOBAL

(尝试连接时没有出现新日志)

但是,302 响应标头如下所示:

Connection: close
Content-Length: 0
Date: Mon, 23 Dec 2019 13:08:28 GMT
Location: http://www.wifionice.de/de/?url=http%3A%2F%2Fdetectportal.firefox.com%2F
Server: squid
Via: 1.1 IMP-redirect (squid)
X-Cache: MISS from IMP-redirect
X-Cache-Lookup: MISS from IMP-redirect:3129

www.wifionice.de是那列火车上的强制门户。detectportal.firefox.com在 Chromium 中打开时,我可以看到重定向到http://www.wifionice.de/de/?url=http%3A%2F%2Fdetectportal.firefox.com%2F已完成,但请求www.wifionice.de没有返回。Curl 返回以下内容:

curl -v http://www.wifionice.de/de/?url=http%3A%2F%2Fdetectportal.firefox.com%2F                                         
* Could not resolve host: www.wifionice.de                                                                                              
* Closing connection 0                                                                                                                  
curl: (6) Could not resolve host: www.wifionice.de 

相关内容