Ubuntu 20.04でインターネットとVPNの接続が失われる問題があります。そこで、以下に基づいてネットワーク管理者を再インストールすることにしました。この回答。
次のコマンドを実行しました。
sudo apt-get purge network-manager
sudo apt-get update
sudo apt-get autoremove
sudo apt-get upgrade
sudo apt-get install network-manager
sudo apt install ubuntu-desktop
その後、システムを再起動した後、インターネットに接続できません。私のモデムはテザリングが有効になっているAndroidデバイスです(上記のコマンドを実行する前にインターネット接続が正常に機能しました)。接続は、「USBイーサネット接続」という名前でUbuntu GUI(右上)に表示されます。インターネットは正常に動作しませんが。
私はそれができることを知り、dhclient usb0
その後インターネットはうまくいきましたが、システムを起動するたびにそれをしなければなりませんでした。また、VPNネットワークに接続できません(エラーはありません。GUIに接続されていると表示されますが、VPNネットワークでのみ利用可能なサーバーにアクセスできません)。
これは私のifconfigです。
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:25:93:e5:82 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker_gwbridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.19.0.1 netmask 255.255.0.0 broadcast 172.19.255.255
inet6 fe80::42:c3ff:fe60:668a prefixlen 64 scopeid 0x20<link>
ether 02:42:c3:60:66:8a txqueuelen 0 (Ethernet)
RX packets 495 bytes 47231 (47.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 520 bytes 80963 (80.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 4c:ed:fb:95:c7:9f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 5192 bytes 487445 (487.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5192 bytes 487445 (487.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.42.109 netmask 255.255.255.0 broadcast 192.168.42.255
inet6 fe80::e097:241:56b:9a3a prefixlen 64 scopeid 0x20<link>
ether 92:28:29:5f:bf:6c txqueuelen 1000 (Ethernet)
RX packets 5 bytes 1058 (1.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 249 bytes 32661 (32.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth05b6c07: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::782e:6ff:fe4a:bdb9 prefixlen 64 scopeid 0x20<link>
ether 7a:2e:06:4a:bd:b9 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48 bytes 6509 (6.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth0ba13b0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::1cc9:c1ff:fef2:b783 prefixlen 64 scopeid 0x20<link>
ether 1e:c9:c1:f2:b7:83 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47 bytes 6425 (6.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth0c2d06c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::286c:9dff:fe62:d6b8 prefixlen 64 scopeid 0x20<link>
ether 2a:6c:9d:62:d6:b8 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth0e104e0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::ac61:95ff:feb6:f31b prefixlen 64 scopeid 0x20<link>
ether ae:61:95:b6:f3:1b txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth1b2a54a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::8c1c:f4ff:fec1:3097 prefixlen 64 scopeid 0x20<link>
ether 8e:1c:f4:c1:30:97 txqueuelen 0 (Ethernet)
RX packets 495 bytes 54161 (54.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 519 bytes 80611 (80.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth1e723d5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::c463:b3ff:fe4e:992c prefixlen 64 scopeid 0x20<link>
ether c6:63:b3:4e:99:2c txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth20ad462: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::7cf1:a6ff:fe67:bd5 prefixlen 64 scopeid 0x20<link>
ether 7e:f1:a6:67:0b:d5 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth2b1261a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::2091:6eff:fe36:6915 prefixlen 64 scopeid 0x20<link>
ether 22:91:6e:36:69:15 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth3575eea: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::94f8:e5ff:fed1:3f13 prefixlen 64 scopeid 0x20<link>
ether 96:f8:e5:d1:3f:13 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth48f5a22: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::d8e6:fcff:fe3f:c003 prefixlen 64 scopeid 0x20<link>
ether da:e6:fc:3f:c0:03 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth4f510a3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a870:e1ff:feb9:9cca prefixlen 64 scopeid 0x20<link>
ether aa:70:e1:b9:9c:ca txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 77 bytes 10671 (10.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth6ca5384: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::80ce:94ff:fe2f:8c8e prefixlen 64 scopeid 0x20<link>
ether 82:ce:94:2f:8c:8e txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth7249d81: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::5c70:7fff:fe9d:54a4 prefixlen 64 scopeid 0x20<link>
ether 5e:70:7f:9d:54:a4 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth875ed12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::1047:dfff:fef6:d885 prefixlen 64 scopeid 0x20<link>
ether 12:47:df:f6:d8:85 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth88216b5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::98bf:c5ff:fe8f:ef44 prefixlen 64 scopeid 0x20<link>
ether 9a:bf:c5:8f:ef:44 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6098 (6.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vetha5da662: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::9c6d:36ff:fefa:4fdc prefixlen 64 scopeid 0x20<link>
ether 9e:6d:36:fa:4f:dc txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethb219fc4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a427:5ff:fe2a:de36 prefixlen 64 scopeid 0x20<link>
ether a6:27:05:2a:de:36 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethb58896f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::80e9:50ff:fe61:aee7 prefixlen 64 scopeid 0x20<link>
ether 82:e9:50:61:ae:e7 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48 bytes 6509 (6.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethdceb1ac: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::387d:c8ff:fea5:4926 prefixlen 64 scopeid 0x20<link>
ether 3a:7d:c8:a5:49:26 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 6115 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
私のファイルは次のとおりです/etc/network/interfaces
(最初にNetwork Managerを再インストールした後は空でしたが、その間に追加しました)。
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
# auto lo
# iface lo inet loopback
# The primary network interface
# auto usb0
# iface usb0 inet dhcp
これは私のネットワークプラン構成です(その/etc/netplan/01-network-amanger-all.yaml
場所でのみ)。
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
そして/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
[device]
wifi.scan-rand-mac-address=no
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:wwan,except:type:ethernet
コンピュータを起動してVPNを使用して接続した後、インターネットを使用できるようにしたいです。なぜ動作が停止したのか、何ができるのか、Ubuntuのネットワーク構成の詳細については、どこで見ることができるのかを説明することができて嬉しいです。
編集#1
次のコマンドを実行すると、システム起動時にインターネット接続が変更されるように見えますが、VPNはまだ機能しません。
apt install resolvconf
systemctl enable systemd-resolved.service
service systemd-resolved start
編集#2
コンピュータを起動sudo apt-get install --reinstall ubuntu-desktop
して再起動した後、VPN設定を編集してVPNに接続できますが、DNS名でサーバーにアクセスできません。
編集#3
以来、問題は解決しました。地図時間