Find the answer to your Linux question:
Results 1 to 2 of 2
I'm trying to configure my Bind9 Server to resolve hostnames, lets say *.example.com (I'm using another domain with name servers setup, it's hosted at hostgator). example.com has public DNS entries ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    24

    Bind9 DNS Question


    I'm trying to configure my Bind9 Server to resolve hostnames, lets say *.example.com (I'm using another domain with name servers setup, it's hosted at hostgator).

    example.com has public DNS entries like as server1.example.com, server2.example.com, server3.example.com, etc configured on that domain.

    From inside my network, I want to be able to resolve server1.example.com to an IP that I specify, I also want to be able to add in my own domains, like voip.example.com to an IP (which isn't set on the public website) on my network. If an entry doesn't exist, like say server2.example.com on my DNS server, then it will resolve the IP address normally (Using what ever DNS server my DNS server uses).

    So far, I have it working, but I must specify every domain. It is only resolving hostnames that I've specified for this domain. It doesn't resolve server2.example.com for example, unless I tell it how. I can't even ping example.com unless I specify the IP.

    Basically: If Bind9 has entry for domain then give IP or else, use the name server specified (or the server's DNS server) to resolve the IP.

    Code:
    $ORIGIN example.com.     ; designates the start of this zone file in the namespace
    $TTL 1h                  ; default expiration time of all resource records without their own TTL value
    ;
    ; BIND data file for example.com
    ;
    @       IN      SOA     ns.nsforexample.com. example.com. (
                                2012112726         ; Serial
                                      7200         ; Refresh
                                       120         ; Retry
                                   2419200         ; Expire
                                    604800)        ; Default TTL
    ;
    @                       IN      NS      ns.nsforexample.com.
    @                       IN      NS      ns2.nsforexample.com.
    server1			IN	A	192.168.1.10
    voip			IN	A	192.168.1.20

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,929
    What you want to do is pretty common, you have a private DNS server that serves your own domains but is only visible on your LAN. All your on-LAN computers are then configured to use your internal DNS server (usually by DHCP, but you can do it statically).

    In your internal DNS server's DNS configuration add 'forwarder' lines to the named.conf. This will tell it which DNS servers to look at for domains it doesn't control.

    There's a bit of an explanation about how its done here: https://support.citrix.com/article/CTX124727
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •