NetworkManager를 다시 설치한 후 인터넷 연결이 제대로 작동하지 않습니다. dhclient usb0에만 유효합니다. VPN 연결이 연결된 것으로 보이지만 연결되지 않음

NetworkManager를 다시 설치한 후 인터넷 연결이 제대로 작동하지 않습니다. dhclient usb0에만 유효합니다. VPN 연결이 연결된 것으로 보이지만 연결되지 않음

우분투 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 이더넷 연결됨"이라는 이름으로 우분투 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

이후부터 문제가 해결되었습니다.지도 시간

관련 정보