Skip to content

Instantly share code, notes, and snippets.

@pojntfx
Last active May 3, 2025 04:19
Show Gist options
  • Save pojntfx/6c30e93377ce3375e0afbcc48b25e100 to your computer and use it in GitHub Desktop.
Save pojntfx/6c30e93377ce3375e0afbcc48b25e100 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