Skip to content

Instantly share code, notes, and snippets.

@bernhardkaindl
Created October 23, 2023 20:34
Show Gist options
  • Save bernhardkaindl/30e17204ee730bcbd91a62694e9a2319 to your computer and use it in GitHub Desktop.
Save bernhardkaindl/30e17204ee730bcbd91a62694e9a2319 to your computer and use it in GitHub Desktop.
Debian/Ubuntu: Prevent changes to /etc/resolv.conf
https://www.cyberciti.biz/faq/dhclient-etcresolvconf-hooks/
chattr +i /etc/resolv.conf
/etc/dhcp/dhclient-enter-hooks.d/nodnsupdate
make_resolv_conf(){
:
}
chmod +x /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment