已连接 WiFi 但上不了网

已连接 WiFi 但上不了网

$ lsb_release -a

No LSB modules are available.
Distributor ID: Pop
Description:    Pop!_OS 22.04 LTS
Release:    22.04
Codename:   jammy

直到周日我才能连接到互联网。周一我无法连接到互联网。我的电脑上没有任何变化。我唯一做的就是sudo apt-get update但它没有下载太多。据我记得,它只下载了几kb的数据。

家里所有的手机都可以通过 WiFi 连接到互联网,除了我的笔记本电脑。当我选择 WiFi 时,起初它看起来已连接,但随后 WiFi 图标上出现一个问号(?)。此外,当我与笔记本电脑共享移动互联网时,一切正常。

最奇怪的是我在另一个房子里也能连接到互联网。

$ ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp47s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether d8:bb:c1:b1:1d:c1 brd ff:ff:ff:ff:ff:ff
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether c4:bd:e5:23:9c:9a brd ff:ff:ff:ff:ff:ff
    altname wlp0s20f3
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:aa:aa:8b:28 brd ff:ff:ff:ff:ff:ff
5: br-a593dce43362: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:84:e4:1e:5d brd ff:ff:ff:ff:ff:ff
6: br-c77e5c8b1ce6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:dd:ac:10:97 brd ff:ff:ff:ff:ff:ff
7: br-c8d5ce7ce6c1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:23:b0:8b:d6 brd ff:ff:ff:ff:ff:ff
8: br-f2e659a6d01a: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:42:33:b3:08 brd ff:ff:ff:ff:ff:ff
9: br-fd59d8ed402b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:0a:00:a2:96 brd ff:ff:ff:ff:ff:ff
10: br-35b3c8def3c9: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:be:6f:12:8f brd ff:ff:ff:ff:ff:ff
11: br-3a165a5c993a: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:eb:5e:ba:28 brd ff:ff:ff:ff:ff:ff
12: br-4d363be4b599: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:32:57:dd:21 brd ff:ff:ff:ff:ff:ff
13: br-4e168a0cdf31: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:81:00:13:f0 brd ff:ff:ff:ff:ff:ff
14: br-9346c9dd9a25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:43:b1:ee:3b brd ff:ff:ff:ff:ff:ff
15: br-a28feae6b83c: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:5d:ba:38:c8 brd ff:ff:ff:ff:ff:ff
16: br-1db02a26bdd0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:e4:ff:fe:a0 brd ff:ff:ff:ff:ff:ff
17: br-4ca8610e3d72: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:c7:ee:50:8c brd ff:ff:ff:ff:ff:ff
18: br-604867f1852d: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:db:85:46:ce brd ff:ff:ff:ff:ff:ff
19: br-8166f1f24274: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:90:63:2e:3f brd ff:ff:ff:ff:ff:ff
20: br-3864e73fa63c: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:fa:fe:ab:c1 brd ff:ff:ff:ff:ff:ff
21: br-46e81cf5fb5e: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:2e:dd:b3:a5 brd ff:ff:ff:ff:ff:ff
22: br-dafd9fc1c73f: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:d8:d7:e3:9d brd ff:ff:ff:ff:ff:ff

$ ip -br addr

lo               UNKNOWN        127.0.0.1/8 ::1/128 
enp47s0          DOWN           
wlo1             UP             192.168.0.13/24 fe80::7820:93db:b655:d21f/64 
docker0          DOWN           172.17.0.1/16 
br-a593dce43362  DOWN           172.18.0.1/16 
br-c77e5c8b1ce6  DOWN           192.168.16.1/20 
br-c8d5ce7ce6c1  DOWN           172.29.0.1/16 
br-f2e659a6d01a  DOWN           172.20.0.1/16 
br-fd59d8ed402b  DOWN           172.28.0.1/16 
br-35b3c8def3c9  DOWN           172.30.0.1/16 
br-3a165a5c993a  DOWN           172.25.0.1/16 
br-4d363be4b599  DOWN           172.19.0.1/16 
br-4e168a0cdf31  DOWN           172.27.0.1/16 
br-9346c9dd9a25  DOWN           172.26.0.1/16 
br-a28feae6b83c  DOWN           172.21.0.1/16 
br-1db02a26bdd0  DOWN           172.31.0.1/16 
br-4ca8610e3d72  DOWN           192.168.0.1/20 
br-604867f1852d  DOWN           172.22.0.1/16 
br-8166f1f24274  DOWN           172.24.0.1/16 
br-3864e73fa63c  DOWN           192.168.49.1/24 
br-46e81cf5fb5e  DOWN           192.168.240.1/20 
br-dafd9fc1c73f  DOWN           172.23.0.1/16 

$ ip route

default via 192.168.0.1 dev wlo1 proto dhcp metric 600 
169.254.0.0/16 dev wlo1 scope link metric 1000 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-a593dce43362 proto kernel scope link src 172.18.0.1 linkdown 
172.19.0.0/16 dev br-4d363be4b599 proto kernel scope link src 172.19.0.1 linkdown 
172.20.0.0/16 dev br-f2e659a6d01a proto kernel scope link src 172.20.0.1 linkdown 
172.21.0.0/16 dev br-a28feae6b83c proto kernel scope link src 172.21.0.1 linkdown 
172.22.0.0/16 dev br-604867f1852d proto kernel scope link src 172.22.0.1 linkdown 
172.23.0.0/16 dev br-dafd9fc1c73f proto kernel scope link src 172.23.0.1 linkdown 
172.24.0.0/16 dev br-8166f1f24274 proto kernel scope link src 172.24.0.1 linkdown 
172.25.0.0/16 dev br-3a165a5c993a proto kernel scope link src 172.25.0.1 linkdown 
172.26.0.0/16 dev br-9346c9dd9a25 proto kernel scope link src 172.26.0.1 linkdown 
172.27.0.0/16 dev br-4e168a0cdf31 proto kernel scope link src 172.27.0.1 linkdown 
172.28.0.0/16 dev br-fd59d8ed402b proto kernel scope link src 172.28.0.1 linkdown 
172.29.0.0/16 dev br-c8d5ce7ce6c1 proto kernel scope link src 172.29.0.1 linkdown 
172.30.0.0/16 dev br-35b3c8def3c9 proto kernel scope link src 172.30.0.1 linkdown 
172.31.0.0/16 dev br-1db02a26bdd0 proto kernel scope link src 172.31.0.1 linkdown 
192.168.0.0/24 dev wlo1 proto kernel scope link src 192.168.0.13 metric 600 
192.168.0.0/20 dev br-4ca8610e3d72 proto kernel scope link src 192.168.0.1 linkdown 
192.168.16.0/20 dev br-c77e5c8b1ce6 proto kernel scope link src 192.168.16.1 linkdown 
192.168.49.0/24 dev br-3864e73fa63c proto kernel scope link src 192.168.49.1 linkdown 
192.168.240.0/20 dev br-46e81cf5fb5e proto kernel scope link src 192.168.240.1 linkdown

$ ip neigh

192.168.0.11 dev wlo1 lladdr 42:3f:8c:00:d9:f7 STALE
192.168.0.1 dev wlo1 lladdr e4:26:86:aa:d8:44 REACHABLE

$ sudo iptables-save -c

# Generated by iptables-save v1.8.7 on Tue Apr 16 20:35:55 2024
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [3:673]
:OUTPUT ACCEPT [0:0]
:DOCKER - [0:0]
:DOCKER-ISOLATION-STAGE-1 - [0:0]
:DOCKER-ISOLATION-STAGE-2 - [0:0]
:DOCKER-USER - [0:0]
[3:673] -A FORWARD -j DOCKER-USER
[3:673] -A FORWARD -j DOCKER-ISOLATION-STAGE-1
[0:0] -A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o docker0 -j DOCKER
[0:0] -A FORWARD -i docker0 ! -o docker0 -j ACCEPT
[0:0] -A FORWARD -i docker0 -o docker0 -j ACCEPT
[0:0] -A FORWARD -o br-dafd9fc1c73f -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-dafd9fc1c73f -j DOCKER
[0:0] -A FORWARD -i br-dafd9fc1c73f ! -o br-dafd9fc1c73f -j ACCEPT
[0:0] -A FORWARD -i br-dafd9fc1c73f -o br-dafd9fc1c73f -j ACCEPT
[0:0] -A FORWARD -o br-46e81cf5fb5e -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-46e81cf5fb5e -j DOCKER
[0:0] -A FORWARD -i br-46e81cf5fb5e ! -o br-46e81cf5fb5e -j ACCEPT
[0:0] -A FORWARD -i br-46e81cf5fb5e -o br-46e81cf5fb5e -j ACCEPT
[0:0] -A FORWARD -o br-3864e73fa63c -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-3864e73fa63c -j DOCKER
[0:0] -A FORWARD -i br-3864e73fa63c ! -o br-3864e73fa63c -j ACCEPT
[0:0] -A FORWARD -i br-3864e73fa63c -o br-3864e73fa63c -j ACCEPT
[0:0] -A FORWARD -o br-8166f1f24274 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-8166f1f24274 -j DOCKER
[0:0] -A FORWARD -i br-8166f1f24274 ! -o br-8166f1f24274 -j ACCEPT
[0:0] -A FORWARD -i br-8166f1f24274 -o br-8166f1f24274 -j ACCEPT
[0:0] -A FORWARD -o br-604867f1852d -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-604867f1852d -j DOCKER
[0:0] -A FORWARD -i br-604867f1852d ! -o br-604867f1852d -j ACCEPT
[0:0] -A FORWARD -i br-604867f1852d -o br-604867f1852d -j ACCEPT
[0:0] -A FORWARD -o br-4ca8610e3d72 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-4ca8610e3d72 -j DOCKER
[0:0] -A FORWARD -i br-4ca8610e3d72 ! -o br-4ca8610e3d72 -j ACCEPT
[0:0] -A FORWARD -i br-4ca8610e3d72 -o br-4ca8610e3d72 -j ACCEPT
[0:0] -A FORWARD -o br-1db02a26bdd0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-1db02a26bdd0 -j DOCKER
[0:0] -A FORWARD -i br-1db02a26bdd0 ! -o br-1db02a26bdd0 -j ACCEPT
[0:0] -A FORWARD -i br-1db02a26bdd0 -o br-1db02a26bdd0 -j ACCEPT
[0:0] -A FORWARD -o br-a28feae6b83c -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-a28feae6b83c -j DOCKER
[0:0] -A FORWARD -i br-a28feae6b83c ! -o br-a28feae6b83c -j ACCEPT
[0:0] -A FORWARD -i br-a28feae6b83c -o br-a28feae6b83c -j ACCEPT
[0:0] -A FORWARD -o br-9346c9dd9a25 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-9346c9dd9a25 -j DOCKER
[0:0] -A FORWARD -i br-9346c9dd9a25 ! -o br-9346c9dd9a25 -j ACCEPT
[0:0] -A FORWARD -i br-9346c9dd9a25 -o br-9346c9dd9a25 -j ACCEPT
[0:0] -A FORWARD -o br-4e168a0cdf31 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-4e168a0cdf31 -j DOCKER
[0:0] -A FORWARD -i br-4e168a0cdf31 ! -o br-4e168a0cdf31 -j ACCEPT
[0:0] -A FORWARD -i br-4e168a0cdf31 -o br-4e168a0cdf31 -j ACCEPT
[0:0] -A FORWARD -o br-4d363be4b599 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-4d363be4b599 -j DOCKER
[0:0] -A FORWARD -i br-4d363be4b599 ! -o br-4d363be4b599 -j ACCEPT
[0:0] -A FORWARD -i br-4d363be4b599 -o br-4d363be4b599 -j ACCEPT
[0:0] -A FORWARD -o br-3a165a5c993a -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-3a165a5c993a -j DOCKER
[0:0] -A FORWARD -i br-3a165a5c993a ! -o br-3a165a5c993a -j ACCEPT
[0:0] -A FORWARD -i br-3a165a5c993a -o br-3a165a5c993a -j ACCEPT
[0:0] -A FORWARD -o br-35b3c8def3c9 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-35b3c8def3c9 -j DOCKER
[0:0] -A FORWARD -i br-35b3c8def3c9 ! -o br-35b3c8def3c9 -j ACCEPT
[0:0] -A FORWARD -i br-35b3c8def3c9 -o br-35b3c8def3c9 -j ACCEPT
[0:0] -A FORWARD -o br-fd59d8ed402b -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-fd59d8ed402b -j DOCKER
[0:0] -A FORWARD -i br-fd59d8ed402b ! -o br-fd59d8ed402b -j ACCEPT
[0:0] -A FORWARD -i br-fd59d8ed402b -o br-fd59d8ed402b -j ACCEPT
[0:0] -A FORWARD -o br-f2e659a6d01a -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-f2e659a6d01a -j DOCKER
[0:0] -A FORWARD -i br-f2e659a6d01a ! -o br-f2e659a6d01a -j ACCEPT
[0:0] -A FORWARD -i br-f2e659a6d01a -o br-f2e659a6d01a -j ACCEPT
[0:0] -A FORWARD -o br-c8d5ce7ce6c1 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-c8d5ce7ce6c1 -j DOCKER
[0:0] -A FORWARD -i br-c8d5ce7ce6c1 ! -o br-c8d5ce7ce6c1 -j ACCEPT
[0:0] -A FORWARD -i br-c8d5ce7ce6c1 -o br-c8d5ce7ce6c1 -j ACCEPT
[0:0] -A FORWARD -o br-c77e5c8b1ce6 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-c77e5c8b1ce6 -j DOCKER
[0:0] -A FORWARD -i br-c77e5c8b1ce6 ! -o br-c77e5c8b1ce6 -j ACCEPT
[0:0] -A FORWARD -i br-c77e5c8b1ce6 -o br-c77e5c8b1ce6 -j ACCEPT
[0:0] -A FORWARD -o br-a593dce43362 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -o br-a593dce43362 -j DOCKER
[0:0] -A FORWARD -i br-a593dce43362 ! -o br-a593dce43362 -j ACCEPT
[0:0] -A FORWARD -i br-a593dce43362 -o br-a593dce43362 -j ACCEPT
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-dafd9fc1c73f ! -o br-dafd9fc1c73f -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-46e81cf5fb5e ! -o br-46e81cf5fb5e -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-3864e73fa63c ! -o br-3864e73fa63c -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-8166f1f24274 ! -o br-8166f1f24274 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-604867f1852d ! -o br-604867f1852d -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-4ca8610e3d72 ! -o br-4ca8610e3d72 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-1db02a26bdd0 ! -o br-1db02a26bdd0 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-a28feae6b83c ! -o br-a28feae6b83c -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-9346c9dd9a25 ! -o br-9346c9dd9a25 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-4e168a0cdf31 ! -o br-4e168a0cdf31 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-4d363be4b599 ! -o br-4d363be4b599 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-3a165a5c993a ! -o br-3a165a5c993a -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-35b3c8def3c9 ! -o br-35b3c8def3c9 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-fd59d8ed402b ! -o br-fd59d8ed402b -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-f2e659a6d01a ! -o br-f2e659a6d01a -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-c8d5ce7ce6c1 ! -o br-c8d5ce7ce6c1 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-c77e5c8b1ce6 ! -o br-c77e5c8b1ce6 -j DOCKER-ISOLATION-STAGE-2
[0:0] -A DOCKER-ISOLATION-STAGE-1 -i br-a593dce43362 ! -o br-a593dce43362 -j DOCKER-ISOLATION-STAGE-2
[3:673] -A DOCKER-ISOLATION-STAGE-1 -j RETURN
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-dafd9fc1c73f -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-46e81cf5fb5e -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-3864e73fa63c -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-8166f1f24274 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-604867f1852d -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-4ca8610e3d72 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-1db02a26bdd0 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-a28feae6b83c -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-9346c9dd9a25 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-4e168a0cdf31 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-4d363be4b599 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-3a165a5c993a -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-35b3c8def3c9 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-fd59d8ed402b -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-f2e659a6d01a -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-c8d5ce7ce6c1 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-c77e5c8b1ce6 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -o br-a593dce43362 -j DROP
[0:0] -A DOCKER-ISOLATION-STAGE-2 -j RETURN
[3:673] -A DOCKER-USER -j RETURN
COMMIT
# Completed on Tue Apr 16 20:35:55 2024
# Generated by iptables-save v1.8.7 on Tue Apr 16 20:35:55 2024
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:DOCKER - [0:0]
[3:1090] -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
[778:52788] -A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
[0:0] -A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.23.0.0/16 ! -o br-dafd9fc1c73f -j MASQUERADE
[0:0] -A POSTROUTING -s 192.168.240.0/20 ! -o br-46e81cf5fb5e -j MASQUERADE
[0:0] -A POSTROUTING -s 192.168.49.0/24 ! -o br-3864e73fa63c -j MASQUERADE
[0:0] -A POSTROUTING -s 172.24.0.0/16 ! -o br-8166f1f24274 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.22.0.0/16 ! -o br-604867f1852d -j MASQUERADE
[2202:192320] -A POSTROUTING -s 192.168.0.0/20 ! -o br-4ca8610e3d72 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.31.0.0/16 ! -o br-1db02a26bdd0 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.21.0.0/16 ! -o br-a28feae6b83c -j MASQUERADE
[0:0] -A POSTROUTING -s 172.26.0.0/16 ! -o br-9346c9dd9a25 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.27.0.0/16 ! -o br-4e168a0cdf31 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.19.0.0/16 ! -o br-4d363be4b599 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.25.0.0/16 ! -o br-3a165a5c993a -j MASQUERADE
[0:0] -A POSTROUTING -s 172.30.0.0/16 ! -o br-35b3c8def3c9 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.28.0.0/16 ! -o br-fd59d8ed402b -j MASQUERADE
[631:65752] -A POSTROUTING -s 172.20.0.0/16 ! -o br-f2e659a6d01a -j MASQUERADE
[0:0] -A POSTROUTING -s 172.29.0.0/16 ! -o br-c8d5ce7ce6c1 -j MASQUERADE
[0:0] -A POSTROUTING -s 192.168.16.0/20 ! -o br-c77e5c8b1ce6 -j MASQUERADE
[0:0] -A POSTROUTING -s 172.18.0.0/16 ! -o br-a593dce43362 -j MASQUERADE
[0:0] -A DOCKER -i docker0 -j RETURN
[0:0] -A DOCKER -i br-dafd9fc1c73f -j RETURN
[0:0] -A DOCKER -i br-46e81cf5fb5e -j RETURN
[0:0] -A DOCKER -i br-3864e73fa63c -j RETURN
[0:0] -A DOCKER -i br-8166f1f24274 -j RETURN
[0:0] -A DOCKER -i br-604867f1852d -j RETURN
[0:0] -A DOCKER -i br-4ca8610e3d72 -j RETURN
[0:0] -A DOCKER -i br-1db02a26bdd0 -j RETURN
[0:0] -A DOCKER -i br-a28feae6b83c -j RETURN
[0:0] -A DOCKER -i br-9346c9dd9a25 -j RETURN
[0:0] -A DOCKER -i br-4e168a0cdf31 -j RETURN
[0:0] -A DOCKER -i br-4d363be4b599 -j RETURN
[0:0] -A DOCKER -i br-3a165a5c993a -j RETURN
[0:0] -A DOCKER -i br-35b3c8def3c9 -j RETURN
[0:0] -A DOCKER -i br-fd59d8ed402b -j RETURN
[0:0] -A DOCKER -i br-f2e659a6d01a -j RETURN
[0:0] -A DOCKER -i br-c8d5ce7ce6c1 -j RETURN
[0:0] -A DOCKER -i br-c77e5c8b1ce6 -j RETURN
[0:0] -A DOCKER -i br-a593dce43362 -j RETURN
COMMIT
# Completed on Tue Apr 16 20:35:55 2024

答案1

长话短说: 怪Docker。


您的 Wifi 网关的 IP 地址为 192.168.0.1/24。

您的众多 Docker 网络之一使用 192.168.0.0/20,本地主机 IP 地址为 192.168.0.1/20:与网关相同(即使网络掩码不同)。

当尝试到达 Internet 的默认路由的网关时,这会产生路由冲突:192.168.0.1 是本地地址。

我猜这可能会把整个互联网变成一个局域网(因为用自己做网关就和没有网关一样):一些对互联网IP地址的请求会触发ARP请求,而不是使用网关。

快速(但临时)修复:停止 Docker 并删除冲突的桥接口:

sudo systemctl stop docker docker.socket
sudo ip link del dev br-4ca8610e3d72

实际的修复方法是删除所有 Docker 网络(使用docker network prunedocker network rm ...)并更改 Docker 的配置,以便它不会使用冲突的网络。例如检查此服务器故障 Q/A:

将 Docker 配置为不使用 172.17.0.0 范围

(并使用 10. ... 范围内的东西)

您可能还想定期清理未使用的 Docker 资源,通常涉及docker ... prune ...,因此 Docker 网络不存在这种积累。

相关内容