修正する

修正する

Debian 11 を使用します。

.ovpn私はCyber​​Ghost VPNがWebサイトで提供するファイル、クライアントキー、証明書を使用して設定しました。すべてのファイルをにコピーしたら、/etc/openvpn/次のコマンドを使用して端末に接続できます。

cd /etc/openvpn

sudo openvpn --config openvpn.ovpn

正常に接続するには、ディレクトリになければなりません。/etc/openvpnそうしないと、鍵と証明書が見つからないというメッセージが表示されます。

設定でGNOME NetworkManager(GUI)を介して接続しようとすると、接続はすぐに失敗します。

実行すると、次のエラーが発生しますsudo systemctl status NetworkManager

Jul 26 13:02:55 debian-desktop nm-openvpn[5657]: UID set to nm-openvpn
Jul 26 13:02:55 debian-desktop nm-openvpn[5657]: Initialization Sequence Completed
Jul 26 13:02:55 debian-desktop nm-openvpn[5657]: event_wait : Interrupted system call (code=4)
Jul 26 13:02:55 debian-desktop nm-openvpn[5657]: net_addr_v4_del: 10.10.4.64 dev tun0
Jul 26 13:02:55 debian-desktop NetworkManager[851]: <info>  [1690369375.0903] vpn-connection[0x55acfc3d84f0,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN plugin: state changed: started (4)
Jul 26 13:02:55 debian-desktop nm-openvpn[5657]: sitnl_send: rtnl: generic error (-1): Operation not permitted
Jul 26 13:02:55 debian-desktop nm-openvpn[5657]: Linux can't del IP from iface tun0
Jul 26 13:02:55 debian-desktop NetworkManager[851]: <info>  [1690369375.0905] vpn-connection[0x55acfc3d84f0,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN plugin: state changed: stopping (5)
Jul 26 13:02:55 debian-desktop NetworkManager[851]: <info>  [1690369375.0905] vpn-connection[0x55acfc3d84f0,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN plugin: state changed: stopped (6)
Jul 26 13:02:55 debian-desktop nm-openvpn[5657]: SIGTERM[hard,] received, process exiting

sudo tail -f /var/log/syslogより多くの洞察力を提供する:

Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.4656] audit: op="connection-activate" uuid="a278295b-7548-4b85-872a-437b96a2cc46" name="CyberGhost" pid=1975 uid=1000 result="success"
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.4681] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: Started the VPN service, PID 6190
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.4720] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: Saw the service appear; activating connection
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.4979] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN plugin: state changed: starting (3)
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.4979] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN connection: (ConnectInteractive) reply received
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-256-CBC' to --data-ciphers or change --cipher 'AES-256-CBC' to --data-ciphers-fallback 'AES-256-CBC' to silence this warning.
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: WARNING: file '/etc/openvpn/client.key' is group or others accessible
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: OpenVPN 2.5.1 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2021
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: library versions: OpenSSL 1.1.1n  15 Mar 2022, LZO 2.10
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: TCP/UDP: Preserving recently used remote address: [AF_INET]37.46.115.44:443
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: UDP link local: (not bound)
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: UDP link remote: [AF_INET]37.46.115.44:443
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1569', remote='link-mtu 1553'
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: WARNING: 'keysize' is used inconsistently, local='keysize 256', remote='keysize 128'
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: [belgrade-rack403.nodes.gen4.ninja] Peer Connection Initiated with [AF_INET]37.46.115.44:443
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: sitnl_send: rtnl: generic error (-101): Network is unreachable
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: TUN/TAP device tun0 opened
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper --debug 0 6190 --bus-name org.freedesktop.NetworkManager.openvpn.Connection_6 --tun -- tun0 1500 1552 10.3.4.78 255.255.255.0 init
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.8377] manager: (tun0): new Tun device (/org/freedesktop/NetworkManager/Devices/7)
Jul 26 13:30:16 debian-desktop systemd-udevd[6202]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.8417] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN connection: (IP Config Get) reply received.
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.8422] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",7:(tun0)]: VPN connection: (IP4 Config Get) reply received
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.8425] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",7:(tun0)]: VPN connection: (IP6 Config Get) reply received
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <warn>  [1690371016.8425] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",7:(tun0)]: invalid IP6 config received!
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <warn>  [1690371016.8426] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",7:(tun0)]: VPN connection: did not receive valid IP config information
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: chroot to '/var/lib/openvpn/chroot' and cd to '/' succeeded
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: GID set to nm-openvpn
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: UID set to nm-openvpn
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: Initialization Sequence Completed
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.8438] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN plugin: state changed: started (4)
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: event_wait : Interrupted system call (code=4)
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: net_addr_v4_del: 10.3.4.78 dev tun0
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: sitnl_send: rtnl: generic error (-1): Operation not permitted
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: Linux can't del IP from iface tun0
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.8460] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN plugin: state changed: stopping (5)
Jul 26 13:30:16 debian-desktop NetworkManager[851]: <info>  [1690371016.8461] vpn-connection[0x55acfc3d8700,a278295b-7548-4b85-872a-437b96a2cc46,"CyberGhost",0]: VPN plugin: state changed: stopped (6)
Jul 26 13:30:16 debian-desktop gnome-shell[1975]: Removing a network device that was not added
Jul 26 13:30:16 debian-desktop nm-openvpn[6196]: SIGTERM[hard,] received, process exiting

私はこれが重大なエラーが発生する場所だと思います。

invalid IP6 config received!
VPN connection: did not receive valid IP config information

エラーはIPv6構成にあるようですが、理由はわかりません。 Cyber​​GhostはIPv6を完全にオフにしてcat /proc/sys/net/ipv6/conf/all/disable_ipv6returnを実行することをお勧めします1。これは、IPv6が無効になっていることを意味します。 IPv6を有効にすると、同じ問題が発生する可能性があります。

ファイルからGUIの接続を取得しました.ovpn

ソフトウェアパッケージが最新です。

編集:IPv6はシステムおよびVPN設定で無効になっています(Cyber​​Ghostは無効にすることをお勧めします)。他のすべての設定はデフォルトです。

修正する

したがって、この問題を解決するために数時間を費やした私のような貧しい人々のための解決策があります!問題は、network-manager-openvpnDebian 11にIPv6にバグがあることです。この問題を解決するには、不安定なブランチから更新されたバージョンをインストールします。これを行うには、次の手順に従います。

次の行を追加します/etc/apt/sources.list

deb https://deb.debian.org/debian/ unstable main contrib non-free
deb-src https://deb.debian.org/debian/ unstable main contrib non-free

次に、このファイルを生成し、/etc/apt/preferences.d/99debian-unstable次のテキストを追加します。

Package: *
Pin: release a=unstable
Pin-Priority: 50

このオプションは、システムが不安定な状態ですべてのパッケージをインポートするのを防ぎ、ユーザーが指定したパッケージのみをインストールするのを防ぐために追加されました。不安定なパッケージ、特に安定したパッケージを混ぜて使用すると、システムの安定性を損なう可能性があるため、インストールはお勧めできませんが、これが唯一の回避策です。

ランニングsudo apt update。不安定なブランチが追加される前にシステムが最新であり、このコマンドがアップグレードする必要があるパッケージがあることを示す場合は、アップグレードしないでください。これが発生すると、デフォルト設定が正しく設定されていないことを意味し、安定システム全体を不安定ブランチにアップグレードすると環境設定が壊れる可能性があります。

すべてが正常な場合は、次のコマンドを実行します。

sudo apt install -t unstable network-manager-openvpn network-manager-openvpn-gnome

その後実行sudo systemctl restart NetworkManager

行ってもいいと思います!

ベストアンサー1

おすすめ記事