Reverse DNS Gives an Incorrect Hostname For My Server or Client

This article is a part of the Troubleshooting collection.

Problem

A reverse lookup of the IP address of your machine (client or server) gives a hostname which is generated by the ISP, and is not the one you want to use:

# host 123.124.125.126
dyn-126.125.my-isp.com

Solution

Configure resolution of that IP address locally on the machine(s) which are getting the incorrect hostname:

  • Define the IP address in the hosts file (/etc/hosts) on the backup client

XXX.XXX.XXX.XXX amanda.mydomain.com

  • Change the name lookup order in /etc/nsswitch.conf file to

      hosts:      files dns

The lookup order, eg. files dns (and/or ldap, nis, ...) so that hosts file is searched before name servers.

Explanation

In this situation, the Amanda security layer does a reverse-DNS lookup of the other host's IP address, and thus sees incoming connections as from e.g.,

instead of the intended

and therefore rejects the connection

Last updated