NetworkManager OpenVPN이 VPN 서버에 대한 추가/잘못된 경로를 생성합니다.

NetworkManager OpenVPN이 VPN 서버에 대한 추가/잘못된 경로를 생성합니다.

저는 Network Manager를 사용하여 Ubuntu의 OpenVPN 서버에 연결하고 있습니다. 연결은 제대로 설정되었지만 VPN 서버의 IP를 잘못된 인터페이스로 라우팅하는 경로가 생성되고 있습니다.

default via 192.168.101.1 dev enxc8f750d7f457 proto dhcp src 192.168.101.212 metric 100
107.152.8.72 via 192.168.101.1 dev enxc8f750d7f457 proto static metric 50
172.16.0.0/12 dev vpn0 proto static scope link metric 50

not needed and incorrect >>>> 172.16.140.182 via 192.168.101.1 dev enxc8f750d7f457 proto static metric 50 <<<<

172.28.12.0/24 dev vpn0 proto kernel scope link src 172.28.12.117 metric 50
192.168.101.0/24 dev enxc8f750d7f457 proto kernel scope link src 192.168.101.212 metric 100
192.168.101.1 dev enxc8f750d7f457 proto static scope link metric 50
192.168.140.0/24 via 192.168.141.1 dev tun0 proto static metric 50
192.168.141.0/24 dev tun0 proto kernel scope link src 192.168.141.2 metric 50

경로를 수동으로 삭제하면 모든 것이 정상입니다. 또한 명령줄에서 openvpn을 실행하면 경로가 생성되지 않고 모든 것이 정상입니다...

default via 192.168.101.1 dev enxc8f750d7f457 proto dhcp src 192.168.101.212 metric 100
107.152.8.72 via 192.168.101.1 dev enxc8f750d7f457 proto static metric 50
172.16.0.0/12 dev vpn0 proto static scope link metric 50
172.28.12.0/24 dev vpn0 proto kernel scope link src 172.28.12.117 metric 50
192.168.101.0/24 dev enxc8f750d7f457 proto kernel scope link src 192.168.101.212 metric 100
192.168.101.1 dev enxc8f750d7f457 proto static scope link metric 50
192.168.140.0/24 via 192.168.141.1 dev tun0
192.168.141.0/24 dev tun0 proto kernel scope link src 192.168.141.2

의견에서 요청한 대로 이것은 nmcli시작 전 openvpn 연결의 출력입니다.

***1 VPN connection
        master enxc8f750d7f457, VPN
        inet4 172.28.12.114/24
        route4 172.16.0.0/12 metric 50
        route4 172.28.12.0/24 metric 50
        inet6 fe80::b0fd:7457:8bb9:645a/64
        route6 fe80::/64 metric 256

enxc8f750d7f457: connected to Dock (DHCP)
        "Realtek RTL8153"
        ethernet (r8152), C8:F7:50:D7:F4:57, hw, mtu 1500
        ip4 default
        inet4 192.168.101.212/24
        route4 default via 192.168.101.1 metric 100
        route4 192.168.101.0/24 metric 100
        route4 192.168.101.1/32 metric 50
        route4 107.152.8.72/32 via 192.168.101.1 metric 50
        inet6 fe80::9f9c:d780:b443:a93c/64
        route6 fe80::/64 metric 1024

lo: connected (externally) to lo
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
        inet4 127.0.0.1/8
        inet6 ::1/128
        route6 ::1/128 metric 256

vpn0: connected (externally) to vpn0
        "vpn0"
        tun, sw, mtu 1390
        inet4 172.28.12.114/24
        route4 172.16.0.0/12 metric 50
        route4 172.28.12.0/24 metric 50
        inet6 fe80::b0fd:7457:8bb9:645a/64
        route6 fe80::/64 metric 256

wlo1: disconnected
        "Intel Cannon Lake PCH CNVi"
        3 connections available
        wifi (iwlwifi), 04:EA:56:3A:81:67, autoconnect, hw, mtu 1500

p2p-dev-wlo1: disconnected
        "p2p-dev-wlo1"
        wifi-p2p, hw

eno2: unavailable
        "Intel I219-LM"
        ethernet (e1000e), C8:F7:50:5D:7B:CE, hw, mtu 1500

DNS configuration:
        servers: 172.16.5.50 172.16.6.50
        interface: vpn0
        type: vpn

        servers: 192.168.101.1
        domains: home
        interface: enxc8f750d7f457

...후에....

***2 VPN connection
        master enxc8f750d7f457, VPN
        inet4 192.168.141.2/24
        route4 192.168.141.0/24 metric 50
        route4 192.168.140.0/24 via 192.168.141.1 metric 50
        inet6 fe80::ac80:5ff7:3635:5611/64
        route6 fe80::/64 metric 256

***1 VPN connection
        master enxc8f750d7f457, VPN
        inet4 172.28.12.114/24
        route4 172.16.0.0/12 metric 50
        route4 172.28.12.0/24 metric 50
        inet6 fe80::b0fd:7457:8bb9:645a/64
        route6 fe80::/64 metric 256

enxc8f750d7f457: connected to Dock (DHCP)
        "Realtek RTL8153"
        ethernet (r8152), C8:F7:50:D7:F4:57, hw, mtu 1500
        ip4 default
        inet4 192.168.101.212/24
        route4 default via 192.168.101.1 metric 100
        route4 192.168.101.0/24 metric 100
        route4 192.168.101.1/32 metric 50
        route4 107.152.8.72/32 via 192.168.101.1 metric 50
        route4 172.16.140.182/32 via 192.168.101.1 metric 50
        inet6 fe80::9f9c:d780:b443:a93c/64
        route6 fe80::/64 metric 1024

lo: connected (externally) to lo
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
        inet4 127.0.0.1/8
        inet6 ::1/128
        route6 ::1/128 metric 256

tun0: connected (externally) to tun0
        "tun0"
        tun, sw, mtu 1500
        inet4 192.168.141.2/24
        route4 192.168.141.0/24 metric 50
        route4 192.168.140.0/24 via 192.168.141.1 metric 50
        inet6 fe80::ac80:5ff7:3635:5611/64
        route6 fe80::/64 metric 256

vpn0: connected (externally) to vpn0
        "vpn0"
        tun, sw, mtu 1390
        inet4 172.28.12.114/24
        route4 172.16.0.0/12 metric 50
        route4 172.28.12.0/24 metric 50
        inet6 fe80::b0fd:7457:8bb9:645a/64
        route6 fe80::/64 metric 256

wlo1: disconnected
        "Intel Cannon Lake PCH CNVi"
        3 connections available
        wifi (iwlwifi), 04:EA:56:3A:81:67, autoconnect, hw, mtu 1500

p2p-dev-wlo1: disconnected
        "p2p-dev-wlo1"
        wifi-p2p, hw

eno2: unavailable
        "Intel I219-LM"
        ethernet (e1000e), C8:F7:50:5D:7B:CE, hw, mtu 1500

DNS configuration:
        servers: 172.16.5.50 172.16.6.50
        interface: vpn0
        type: vpn

        servers: 192.168.101.1
        domains: home
        interface: enxc8f750d7f457

그게 정확히 무엇을 의미하는지, 어떻게 설정했는지는 잘 모르겠지만 master enxc8f750d7f457, VPN, 그렇다면 더 정확할 것 같습니다 master vpn0, VPN. ***2 VPN 연결은 ***1 VPN 연결 내부에 있습니다.

관련 정보