Changing DNS records on a Debian Linux Box - Newbie

Posted on 2007-07-24
Last Modified: 2010-04-20
We have inherited a company that has their public DNS records set up on a Deban GNU Linux box (v4.0).  I am not sure what DNS server they are running, however my guess is that it is BIND.  We just moved our website to a different host & need to know how to change the www. record to point to the new IP address.  Can someone please give me an idea of how to do this change?

Question by:rustyrpage
    LVL 12

    Accepted Solution

    DNS on BIND is setup via text configuration files.

    A good place to start is by typing:

    whereis named

    at the command line.

    This should lead you to the location of the configuration file, usually /etc/named.conf

    inside there you will see something like

    options {
            directory "/var/named/";

    that is the directory in which the conf files are stored.

    Scrolling down in the conf will reveal to you the filename of the zone that you want to edit.

    then.. simply go the directory in which those files are, and edit the one you need.

    Dont forget to increment the serial number, or else it won't take.

    Proper syntax for the serial number is YYYYMMDD##

    BUT, it does not have to be that way. it can be just any number greater than what it was.

    LVL 19

    Expert Comment

    cd /etc/bind/
    or cd /etc/bind9/

    You should find a file called db.yourhostname or something similar enter it you will see the www entry as an A or CNAME entry change it, then /etc/init.d/bind restart or /etc/init.d/bind9 restart.

    It might be some time before your clients will go to the new www because there might be routers and or ISP around that have the old IP cached. To make sure ping from within your debian box.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now