DNS Bind Question

Issues related to configuring your network
Post Reply
JPdeB
Posts: 3
Joined: 2022/01/20 17:13:51

DNS Bind Question

Post by JPdeB » 2022/01/20 17:20:17

Hello,

I have a question about Bind DNS configuration. I have a DNS zone configured like below, which is working fine.

Code: Select all

$TTL 15m
@    IN        SOA    @ info.example.com. (
          2021012801    ;serial
          6h            ;refresh
          15m           ;retry
          1w            ;expiry
          1d            ;minimum
          )
; ... and NS also.
@    IN        NS    @

; addresses for example.com.
@                                  A        10.3.5.130
update                          A       10.3.5.130
drm.srv                         A       10.3.5.130
but i have another domain name cr.example.com which should be resolved at a different DNS server because that will point to a public IP and is maintaned on a different server. How could i do that best. I am running BIND version 9.11.4

Thanks in advance!

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DNS Bind Question

Post by TrevorH » 2022/01/20 17:26:31

Bind has a feature called a "view" that you can use to serve different results from different zone files depending on the ip address making the query.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

JPdeB
Posts: 3
Joined: 2022/01/20 17:13:51

Re: DNS Bind Question

Post by JPdeB » 2022/01/20 17:36:38

Hey Trevor, i do know about the view feature in bind we use that so that if you come from a public IP to for example ftp.example.com you will get a public IP but if you come from a private IP you will get a private ip for that domain.

In this case the quary allways comes from the same private IP but the domain names with a private ip is configured on the local DNS server and domain names with a public IP are configured on a external DNS server.

JPdeB
Posts: 3
Joined: 2022/01/20 17:13:51

Re: DNS Bind Question

Post by JPdeB » 2022/01/20 19:21:01

So i fixed this by delegating the sub-domains that have a public IP to a different DNS server. See below example

Code: Select all

$TTL 15m
@    IN        SOA    @ info.example.com. (
          2021012801    ;serial
          6h            ;refresh
          15m           ;retry
          1w            ;expiry
          1d            ;minimum
          )

@                               IN      NS      @

; addresses for example.com.
www                             NS      dns.example.nl.
update                          A       10.3.3.3
drm.srv                         A       10.3.3.3

cr.example.com.                NS      dns.example.nl.
cr2.example.com.               NS      dns.example.nl.
siteadmin.example.com.         NS      dns.example.nl.
dns.example.nl.                A       10.2.2.2

Post Reply