Menu

#4712 [BIND DNS] Update reverse records not working if a reverse record is present

1.780
open
nobody
5
2016-02-16
2016-02-12
No

I've noticed that webmin isn't creating reverse PTR records when adding an A record to a DNS zone if another PTR with the same address already exists.
Picking the "Yes, and replace existing" option when creating the A record will work.
Editing an existing A record and filling in the "update reverse: yes" option doesn't work either.

This has worked in past versions of webmin, pre-1.780.

Setup:
BIND DNS server bind-9.8.2-0.37.rc1.el6_7.6 (running in a chroot)
CentOS 6.7
webmin-1.780-1
2 DNS zones configured: forwardzone.pt and 10.in-addr.arpa

view "public" {
        match-clients { any; };
        allow-query { any; };
        recursion no;

        zone "forwardzone.pt" {
                type master;
                file "master/forwardzone.pt.public";
                };
        zone "10.in-addr.arpa" {
                type master;
                file "master/10.0.0.0_8.public.rev";
                };
};

Steps to reproduce:
1. open webmin, go to BIND DNS Server -> forwardzone.pt -> Address
2. add record: www1; 10.2.3.1; update reverse = Yes
3. add record: www2; 10.2.3.1; update reverse = Yes
4. add record: www3; 10.2.3.3; update reverse = Yes
5. add record: www4; 10.2.3.3; update reverse = Yes (and replace existing)
6. Check reverse records added

Expected:

1.3.2.10.in-addr.arpa.  IN      PTR     www1.forwardzone.pt.
1.3.2.10.in-addr.arpa.  IN      PTR     www2.forwardzone.pt.
3.3.2.10.in-addr.arpa.  IN      PTR     www4.forwardzone.pt.

Actual result:

1.3.2.10.in-addr.arpa.  IN      PTR     www1.forwardzone.pt.
3.3.2.10.in-addr.arpa.  IN      PTR     www4.forwardzone.pt.

One would expect to add a second PTR record for the 1.3.2.10.in-addr.arpa. address, but webmin silently fails.

The zone files (after the tests):

;;; /var/named/master/forwardzone.pt.public
$ttl 38400
forwardzone.pt. IN      SOA     lolcathost. dnsadmin.forwardzone.pt (
                        2015070111
                        10800
                        3600
                        604800
                        38400 )
forwardzone.pt. IN      NS      lolcathost.

www1    IN      A       10.2.3.1
www2    IN      A       10.2.3.1
www3    IN      A       10.2.3.3
www4    IN      A       10.2.3.3
;;; /var/named/master/10.0.0.0_8.public.rev
$TTL    86400
@       IN      SOA     . dnsadmin.forwardzone.pt. (
                        2016021110
                        10800
                        3600
                        604800
                        86400 )

 IN     NS      lolcathost.

1.3.2.10.in-addr.arpa.  IN      PTR     www1.forwardzone.pt.
3.3.2.10.in-addr.arpa.  IN      PTR     www4.forwardzone.pt.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2016-02-13

    That is actually expected - you can't have two PTR records for the same IP (as far as I know)

     
  • André Fernandes

    We can have multiple PTR records for the same address, it's just not recommended. We have a working setup where a few hosts have multiple reverse records.

    If webmin won't add a second PTR, can it at least output some message stating that a reverse record already exists?

     
  • Jamie Cameron

    Jamie Cameron - 2016-02-16

    Out of interest, in what situation is having multiple PTR records for the same IP useful?

     
  • André Fernandes

    When you have multiple websites hosted behind the same IP address, for example.
    If you have www.example1.com, www.example2.com, www.example3.com pointing to 11.22.33.44, it'd be useful to reverse-lookup that IP address to find all the names pointing to it.

     
  • Jamie Cameron

    Jamie Cameron - 2016-02-16

    Ok, I will look into supporting multiple PTR records for the same IP in Webmin / Virtualmin.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.