How to create a DNS server for requests coming from external locations (internet)?

Discussion in 'HOWTO-Related Questions' started by zenny, Feb 5, 2008.

  1. zenny

    zenny Member

    If I have two static public IP addresses (in different locations), how can I create create a DNS server for requests coming from external locations (internet)?

    I am just wondering if that is possible so that I do not have to rely on the other DNS service providers to host my own domain in my server (hosted at home)?

    It would be wonderful if there is any tutorials like other Howtoforge articles by Falko and Tim. Thanks!
  2. topdog

    topdog Active Member

    This is easy to do just install bind at both locations and create the zone file on the master and get the slave to transfer the zone and then setup the pointers with you registry.
  3. zenny

    zenny Member

    Thanks topdog. Since I am new to the DNS regime, could you just explain or point to any tutorial on master and slave zone configurations for such an arrangement to work?

    Thanks again!
  4. topdog

    topdog Active Member

    I dont know of a howto that describes setting up both the slave and master. but i will give you pointers here

    on the master edit /etc/named.conf and add

    zone "" {
      type master;
      file "";
      allow-transfer { ip_address_of_slave; };
    Then create the zone file /var/named/ and add this
    $ttl 38400
    @       IN      SOA (
                            38400 )
    @       IN      NS
    @       IN      NS
    ns1     IN A dnsmasterip
    ns2     IN A dnsslaveip  IN      A    serverip
    www      IN      A      serverip
    Then on the slave edit /etc/named.conf and add this
    zone "" {
      type slave;
      masters { masterip; };
      file "slaves/";
    Reload servers on both sides and verify that the zone transfer is working and that you can query the names on the servers

    Then go to your register and request them to change the whois information to point to your two new dns servers.

    Thats it.

    NOTE: if you are using bind-chrooted which is the default on Centos then the files will be located in /var/named/chroot/
    NOTE: This is not a copy and paste description please look through and make the changes to reflect your environment like ip addresses and domain names.

    And there are howtos on doing this with ispconfig here.
    Last edited: Feb 6, 2008

Share This Page