DNS IP

The DNS IP integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] will expose an IP address, fetched via DNS resolution (every 2 minutes), as its value. It provides both IPv4 and IPv6 lookup as separate sensors depending on accessibility to resolvers.

  1. When you enable the integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] with the default value, it will query the OpenDNS nameservers with the hostname myip.opendns.com, which will resolve to your external/public IP address.
  2. If you specify a hostname, a regular DNS lookup will be performed, providing you the IP the hostname resolves to. If your hostname resolves to multiple IP addresses, the lowest IP will be returned as the state. The first 10 IPs will be returned in ascending order in the ip_addresses attribute.

Configuration

To add the DNS IP service to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

Options

To define options for DNS IP, follow these steps:

  1. In Home Assistant, go to Settings > Devices & services.

  2. If multiple instances of DNS IP are configured, choose the instance you want to configure.

  3. On the card, select the cogwheel .

    • If the card does not have a cogwheel, the integration does not support options for this device.

    Screenshot showing the cogwheel icon on an integration card in the Settings > Devices & services page

  4. Edit the options, then select Submit to save the changes.

Resolver

You may override the default IPV4 and IPV6 nameservers that are being used by setting any nameserver IP address you like, for example 1.1.1.1 (IPV4) or 2606:4700:4700::1111 (IPV6).

Port

You may override the default DNS port of 53. This may be useful to bypass DNS filtering or redirection.