Skip to main content

How to get rid of reddog.microsoft.com search domain on Ubuntu Linux in Azure

136 words·1 min

If you’ve used Linux on Azure for any length of time you’ll find an annoying search domain that Azure DHCP appends to your resolv.conf.

Here’s a copy of my resolv.conf as an example.

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.10.11
nameserver 192.168.10.12
search reddog.microsoft.com

Microsoft does this by default even if you have your own internal name servers since the DHCP process within a VNET is handled by Azure.

To get rid of this annoyance you can edit your /etc/dhcp/dhclient.conf and add the following one liner:

supersede domain-name "dky.io";

After that you can refresh DHCP with:

sudo dhclient -v

Once done check your /etc/resolv.conf to find the search domain reddog.* to be replaced with your domain above.