Changing IP in zone files

Discussion in 'ISPConfig 3 Priority Support' started by Numerizen, Sep 12, 2014.

  1. Numerizen

    Numerizen Member

    Hi all,

    I'm on the verge of migrating my old ISPC 2 server to a brand new ISPC 3 one.

    Everything is set up and tzsted with the script I bought from projektfarm. Jus thave to refresh data a last time before shutting down the poor old thing.

    As it's also my primary server DNS server (dns.numerizen.com below), I checked the zone files, to verify the IPs are OK, but saw that the old server is still refered :


    $TTL 86400
    @ IN SOA dns.numerizen.com. admin.aaesff.com. (
    2014091204
    28800
    7200
    604800
    86400 )
    ;

    www 86400 A xx.xx.14.107
    aaesff.com. 86400 NS dns.numerizen.com.
    aaesff.com. 86400 NS ns6.gandi.net.

    The IP should be xx.xx.19.62, the one of the new server where all my sites will be hosted after I complete the migation.

    There are plenty of occurrences, in several files, so a way to change it all at once would be great.

    Also, as the primary domain won't change, I understand just updating the glue record will launch the DNS propagation with the new DNS info. Is this correct ?

    I already warned my clients the migration will take place tonight, finished on monday top, so a quick answer is pretty vital to me ...

    Thanks in advance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Dont change any IP addresses in zoe files, change them in the ispconfig database and then run a resync. Example:

    old IP: 2.2.2.2
    new ip: 1.1.1.1

    the sql query for that is:

    update dns_rr SET data = '1.1.1.1' WHERE data = '2.2.2.2';

    run this in the dbispconfig database. Then login to ispconfig, go to Tools > resync, select dns and start the resync to write the new BIND config files.
     
  3. Numerizen

    Numerizen Member

    Thanks a bunch.

    Did that : the info seems to be OK in ISPC, and the zone files were changed a few seconds after : great !

    Also, can you confirm my DNs server should be OK with this manipulation and the glue record stuff I mentionned before ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    you can check the local dns server with this command:

    dig @localhost domain.tld

    replace domain.tld with the domain name. This should return the correct new IP address.
     
  5. Numerizen

    Numerizen Member

    [email protected]:/etc/bind# dig @localhost numerizen.com

    ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @localhost numerizen.com
    ; (2 servers found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60691
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;numerizen.com. IN A

    ;; AUTHORITY SECTION:
    numerizen.com. 86400 IN SOA dns.numerizen.com. vb.numerizen.com. 2014091284 28800 7200 604800 86400

    ;; Query time: 13 msec
    ;; SERVER: ::1#53:):1)
    ;; WHEN: Fri Sep 12 17:05:19 2014
    ;; MSG SIZE rcvd: 74

    Seems OK to me, but no visible IP address. Is this wrong ?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not okas you got no answer. Did you run the command on the new ispconfig 3 server?

    take a look at the bind zonefile directory, has the zonefile for this domain a .err ending? If yes, then bind rejected it.
     
  7. Numerizen

    Numerizen Member

    Yes.

    No .err file in the directory (/etc/bind). The pri.numerizen.com file seems OK.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, thats strange. Please reboot the server and try again.
     
  9. Numerizen

    Numerizen Member

    Just a thought :

    I use glue records, as my DNS is dns.numerizen.com, and the primary domain for the server is numerizen.com.

    As the glue record is still bound to the ancient IP, can't it mess up something in the name resolution ?
     
  10. Numerizen

    Numerizen Member

    Did the reboot : still the same answer :

    [email protected]:~# dig @localhost numerizen.com

    ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @localhost numerizen.com
    ; (2 servers found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48105
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;numerizen.com. IN A

    ;; AUTHORITY SECTION:
    numerizen.com. 86400 IN SOA dns.numerizen.com. vb.numerizen.com. 2014091284 28800 7200 604800 86400

    ;; Query time: 18 msec
    ;; SERVER: ::1#53:):1)
    ;; WHEN: Fri Sep 12 17:40:52 2014
    ;; MSG SIZE rcvd: 74


    ********* UPDATE ***********

    Querying the local IP is OK :

    [email protected]:/etc/bind# dig @92.243.19.62 numerizen.com

    ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @92.243.19.62 numerizen.com
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23213
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;numerizen.com. IN A

    ;; AUTHORITY SECTION:
    numerizen.com. 86400 IN SOA dns.numerizen.com. vb.numerizen.com. 2014091284 28800 7200 604800 86400

    ;; Query time: 0 msec
    ;; SERVER: 92.243.19.62#53(92.243.19.62)
    ;; WHEN: Fri Sep 12 17:50:54 2014
    ;; MSG SIZE rcvd: 74
     
    Last edited: Sep 12, 2014
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Both are not OK. as longa s you get "ANSWER: 0" then this means that the server did not answer.

    The glue record does not matter for this test as the glue record is not on this server.

    Please post the zonefile of this domain.
     
  12. Numerizen

    Numerizen Member

    $TTL 86400
    @ IN SOA dns.numerizen.com. vb.numerizen.com. (
    2014091284 ; serial, todays date + todays serial #
    28800 ; refresh, seconds
    7200 ; retry, seconds
    604800 ; expire, seconds
    86400 ) ; minimum, seconds
    ;

    aaesff 86400 A 92.243.19.62
    adonis 86400 A 92.243.19.62
    aedilis 86400 A 92.243.19.62
    ajax 86400 A 92.243.19.62
    alabm 86400 A 92.243.19.62
    almede 86400 A 92.243.19.62
    archipels 86400 A 92.243.19.62
    averell.da 86400 A 92.243.19.62
    avispneumo 86400 A 92.243.19.62
    azonic 86400 A 92.243.19.62
    bioberbere 86400 A 92.243.19.62
    bugs 86400 A 92.243.19.62
    cartaro 86400 A 92.243.19.62
    catbook 86400 A 92.243.19.62
    cc 86400 A 92.243.19.62
    chattermark 86400 A 92.243.19.62
    couture 86400 A 92.243.19.62
    css.test.recma 86400 A 95.142.171.122
    ctmk 86400 A 92.243.19.62
    d6 86400 A 92.243.19.62
    d8 86400 A 92.243.19.62
    da 86400 A 92.243.19.62
    dc 86400 A 92.243.19.62
    demo 86400 A 92.243.19.62
    dev 86400 A 92.243.19.62
    devec 86400 A 92.243.19.62
    devrecma 86400 A 92.243.8.236
    dns 86400 A 92.243.19.62
    drupal 86400 A 92.243.19.62
    ec 86400 A 92.243.19.62
    elsevier 86400 A 92.243.8.236
    esperluete 86400 A 92.243.19.62
    etude 86400 A 92.243.19.62
    fild7 86400 A 92.243.19.62
    filoeuvre 86400 A 92.243.19.62
    fk 86400 A 92.243.19.62
    gd7 86400 A 92.243.19.62
    glossaire 86400 A 92.243.19.62
    grafbook 86400 A 92.243.19.62
    hv 86400 A 92.243.19.62
    ilm 86400 A 92.243.19.62
    img.test.recma 86400 A 95.142.171.122
    irht 86400 A 92.243.19.62
    jack.da 86400 A 92.243.19.62
    joe.da 86400 A 92.243.19.62
    js.test.recma 86400 A 95.142.171.122
    leitax 86400 A 92.243.19.62
    libraria 86400 A 92.243.19.62
    magpatients 86400 A 92.243.19.62
    marc 86400 A 92.243.19.62
    meeting 86400 A 92.243.19.62
    notaires 86400 A 92.243.19.62
    old 86400 A 92.243.19.62
    oldrecma 86400 A 92.243.8.236
    pepart 86400 A 92.243.19.62
    prestashop 86400 A 92.243.19.62
    projet 86400 A 92.243.19.62
    projets 86400 A 92.243.19.62
    recma 86400 A 92.243.8.236
    rudy 86400 A 92.243.19.62
    sandbox 86400 A 92.243.19.62
    skr 86400 A 92.243.19.62
    solairegie 86400 A 92.243.19.62
    symfony 86400 A 92.243.19.62
    td 86400 A 92.243.19.62
    test.recma 86400 A 95.142.171.122
    tilly 86400 A 92.243.19.62
    urmk 86400 A 92.243.19.62
    uro 86400 A 92.243.19.62
    vertika 86400 A 92.243.19.62
    video-els 86400 A 92.243.19.62
    vs 86400 A 92.243.19.62
    web 86400 A 92.243.19.62
    wiking 86400 A 92.243.19.62
    william.da 86400 A 92.243.19.62
    wiking 86400 A 92.243.19.62
    william.da 86400 A 92.243.19.62
    www 86400 A 92.243.19.62
    numerizen.com. 86400 MX 10 web.numerizen.com.
    numerizen.com. 86400 NS dns.numerizen.com.
    numerizen.com. 86400 NS ns6.gandi.net.
    numerizen.com. 86400 TXT "v=spf1 a mx ptr ~all"


    Lots of unused stuff in there, sorry.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    looks fine on the first glance. Please try to check with:

    named-checkzone numerizen.com /etc/bind/pri.numerizen.com

    and your server is isntalled exactly as decstibed in one of the perfect server guides? You did not left something out or changed any paths?
     
  14. Numerizen

    Numerizen Member

  15. till

    till Super Moderator Staff Member ISPConfig Developer

    That should be ok.

    Is the IP of the new server the one that ends with .62 ?
     
  16. Numerizen

    Numerizen Member

    Yes it is.
     
  17. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Hello,

    it seems you missed adding the dns A record without www (only MX etc are there).
    Try the dig command with www.numerizen.com and it will work.
    So you have to add the one without www.
     
  18. Numerizen

    Numerizen Member

    My god, you're right.

    These zone files were produced by ISPC2. Any action to take to correct this ?

    Will my server be OK set up like this ?

    ******* EDIT **********

    Added :

    numerizen.com. 86400 A 92.243.19.62

    ... and dig is ok :

    [email protected]:/etc/bind# dig @localhost numerizen.com

    ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @localhost numerizen.com
    ; (2 servers found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44225
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

    ;; QUESTION SECTION:
    ;numerizen.com. IN A

    ;; ANSWER SECTION:
    numerizen.com. 86400 IN A 92.243.19.62

    ;; AUTHORITY SECTION:
    numerizen.com. 86400 IN NS dns.numerizen.com.
    numerizen.com. 86400 IN NS ns6.gandi.net.

    ;; ADDITIONAL SECTION:
    dns.numerizen.com. 86400 IN A 92.243.19.62

    ;; Query time: 0 msec
    ;; SERVER: ::1#53:):1)
    ;; WHEN: Fri Sep 12 19:01:51 2014
    ;; MSG SIZE rcvd: 108
     
    Last edited: Sep 12, 2014
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    just add a new a-record for "numerizen.com." in the zone.

    Yes.
     
  20. Numerizen

    Numerizen Member

    Great ! Can't thank you enough for your help.

    Have a nice week end guys.

    (Hope mine will not be spoiled by side effects of the migration.)
     

Share This Page