tools/ignore-veth.sh

This commit is contained in:
Anthony Axenov 2024-07-31 23:37:57 +08:00
parent def4f6761a
commit 22d12fd902
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC

13
tools/ignore-veth.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
# https://forums.opensuse.org/t/networkmanager-shows-connection-to-lo/164441/13
# https://man.archlinux.org/man/NetworkManager.conf.5.en#Device_List_Format
# https://access.redhat.com/documentation/ru-ru/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-networkmanager-to-ignore-certain-devices_configuring-and-managing-networking
sudo touch /etc/NetworkManager/conf.d/10-ignore-veth.conf
sudo tee <<EOF /etc/NetworkManager/conf.d/10-ignore-veth.conf > /dev/null
# Disable virtual interfaces to be managed via NetworkManager
[keyfile]
unmanaged-devices=interface-name:veth*
EOF
sudo systemctl reload NetworkManager