Skip to content

Instantly share code, notes, and snippets.

@awsvpc
Forked from pojntfx/README.md
Created May 3, 2025 04:19
Show Gist options
  • Save awsvpc/78673597e1b1af1d4963e18c7a64b3cd to your computer and use it in GitHub Desktop.
Save awsvpc/78673597e1b1af1d4963e18c7a64b3cd to your computer and use it in GitHub Desktop.
Disable IPv6 privacy extensions, disable MAC address randomization and enable 1.1.1.1 DNS with NetworkManager

Make sure to setup NetworkManager as described in https://wiki.debian.org/NetworkManager first. In particular, be sure to remove the devices you want to manage with NetworkManager from /etc/network/interfaces.

/etc/NetworkManager/NetworkManager.conf should look like the following:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=true
while read i; do
echo "Setting up connection $i ..."
sudo nmcli conn modify "$i" ipv6.addr-gen-mode eui64
sudo nmcli conn modify id "$i" 802-11-wireless.cloned-mac-address permanent # This is only relevant when using Wifi
sudo nmcli conn modify "$i" ipv4.dns "1.1.1.1"
sudo nmcli conn modify "$i" ipv6.dns "2606:4700:4700::1111"
sudo nmcli conn up "$i"
done <<< "$(nmcli -g name conn show)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment