Public bug reported:

If you configure your top level fully qualified domain name (FQDN) to
use a wildcard DNS record in its zone file in bind9, any sub-servers
(subdomains) or hostnames using part of the FQDN will

have unexpected behavior when attempting to resolve DNS.

--------------------------------------------------------------------------------------------------
Steps to reproduce:
--------------------------------------------------------------------------------------------------

-------------------------------------------------------------
Using the main server where the top level FQDN is configured:
-------------------------------------------------------------

1.  Create a wildcard A record in the main name server's zone file for
your domain.  Let's use example.com for this report.

sudo nano /etc/bind/example.com

Add this line to the end of the file:

*                       IN A    1.1.1.1

2.  Save changes to the file and quit the editor.

3.  Reload / restart bind9 to apply these changes.

sudo service bind9 restart

-------------------------------------------------------------
On a subdomain server (just another server) that will use part of the FQDN:
-------------------------------------------------------------

1.  Change your server's hostname by editing /etc/hostname

sudo nano /etc/hostname

2.  Use a FQDN such as server1.example.com
2.  Save changes to the file and quit the editor.
4.  Add a hosts file entry for server1.example.com in /etc/hosts

sudo nano /etc/hosts

Add this line to the end of the file:

127.0.1.1       server1.example.com

5.  Save changes to the file and quit the editor.
6.  Reboot the server to apply the hostname and hosts changes.  

sudo shutdown -r now

7.  In a terminal, ping any unresolvable or unknown host.

ping adsfadsfadsfdsafadsfadsfadsfadsfadsfadsf.com

The ping command appends .example.com to the host.
adsfadsfadsfdsafadsfadsfadsfadsfadsfadsf.com.example.com will thus
resolve to *.example.com.

This is INCORRECT because I did NOT ping
"adsfadsfadsfdsafadsfadsfadsfadsfadsfadsf.com.example.com"  I pinged
"adsfadsfadsfdsafadsfadsfadsfadsfadsfadsf.com".

Wildcard DNS entries are being appended to a host lookup in certain
utilities such as ping.  This should NOT be happening.

If you remove the wildcard entry from the main FQDN server and reload
bind, pinging from the sub-server will now correctly return the error I
was expecting of "ping: unknown host

adsfadsfadsfdsafadsfadsfadsfadsfadsfadsf.com"

More info:  https://ubuntuforums.org/showthread.php?t=2368024

** Affects: ubuntu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1708905

Title:
  FQDN used as a hostname causes ping and other lookups to append the
  FQDN to unknown / unresolvable hosts when using wildcard DNS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1708905/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to