From 80d55d2739c25eef2b13071029a9965c7cdd73a4 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 3 Nov 2026 19:35:39 +0100 Subject: [PATCH] Leave dhcpcd and NetworkManager host identity out of captures dhcpcd, present on Ubuntu 24.04 and later and on EL10, keeps its leases, DUID and secret in /var/lib/dhcpcd, and NetworkManager keeps a secret in secret_key. Copied into an image, every clone would use the same DHCPv6 DUID and derive the same stable privacy IPv6 addresses. Both regenerate them when missing. --- imgutil/imgutil | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/imgutil/imgutil b/imgutil/imgutil index 37d96ec2..814fc8aa 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -168,6 +168,11 @@ CAPTURE_DROP_FILES = ( '/var/lib/NetworkManager/*.lease', '/var/lib/dhclient/*.lease*', # dhclient on Debian and Ubuntu, unlike dhcpd.leases of a DHCP server '/var/lib/dhcp/dhclient*.leases', + # dhcpcd (Ubuntu 24.04 and later, EL10) and NetworkManager keep a per host + # DUID and secret, shared ones would give every clone the same DHCPv6 + # identity and stable privacy IPv6 addresses + '/var/lib/dhcpcd/*.lease*', '/var/lib/dhcpcd/duid', '/var/lib/dhcpcd/secret', + '/var/lib/NetworkManager/secret_key', '/root/.*_history', '/root/.lesshst', '/root/.viminfo', '/etc/NetworkManager/system-connections/*', '/etc/sysconfig/network-scripts/ifcfg-*')