ISPConfig Local DNS server settings (Ubuntu 12.04 LTS)

Discussion in 'HOWTO-Related Questions' started by neoszion, Jun 24, 2012.

  1. neoszion

    neoszion New Member

    Hi there,

    I have just completed the install of ISP config on my local server and everything is running very smooth. I would like to create websites locally without having to edit my pc host file every time I set up a local site on my server. I also want all of the pc's on my network to go via this server.

    How is this possible I am very new to DNS so some light reading would be great :) thanks in advance for you response.
     
  2. neoszion

    neoszion New Member

    *Bump*

    Sorry wondered if this is possible?
     
  3. falko

    falko Super Moderator Howtoforge Staff

    You must create a local DNS server and then use it in your router settings so that the router tells the client PCs (via DHCP) to use that nameserver.

    You can use the DNS module in ISPConfig to create DNS zones.
     
  4. neoszion

    neoszion New Member

    thanks for your reply.

    How would I check that the setting I have put into ISP config are running correctly?
     
  5. neoszion

    neoszion New Member

    OK so I set up a Zone and when I do a nslookup of the domain on the the server I get the following error:

    eden@eden:/etc/bind$ nslookup eden.local
    ;; Got SERVFAIL reply from 127.0.0.1, trying next server
    ;; Got SERVFAIL reply from 127.0.0.1, trying next server
    Server: ::1
    Address: ::1#53

    ** server can't find eden.local: SERVFAIL

    When I do an NSLookup of the IP I get the following:

    eden@eden:/etc/bind$ nslookup 192.168.0.3
    Server: 127.0.0.1
    Address: 127.0.0.1#53

    ** server can't find 3.0.168.192.in-addr.arpa.: NXDOMAIN

    ###################################################

    Not sure where I am going wrong here? Screenshots of my zone page attached.
     

    Attached Files:

  6. TiTex

    TiTex Member

    you should have a file pri.eden.local in your /etc/bind/ folder , check if it's there
     
  7. neoszion

    neoszion New Member

    Thanks for your reply.

    Yes it is there it contains the following:

    #######################################

    $TTL 3600
    @ IN SOA ns1.eden.local. [email protected]. (
    2012062702 ; serial, todays date + todays serial #
    7200 ; refresh, seconds
    540 ; retry, seconds
    604800 ; expire, seconds
    86400 ) ; minimum, seconds
    ;

    eden.local. 3600 A 192.168.0.3
    eden.local. 3600 MX 10 mail.eden.local.
    eden.local. 3600 NS ns1.eden.local.
    eden.local. 3600 NS ns2.eden.local.
    mail 3600 A 192.168.0.3
    www 3600 A 192.168.0.3
     
  8. TiTex

    TiTex Member

    can you post the contents of /etc/resolv.conf ?
    also is your bind/named service started ?
     
  9. neoszion

    neoszion New Member

    the etc/resolv.conf
    Yes the bind name service is running, but to be sure I just done a "sudo service bind9 start"...
     
  10. TiTex

    TiTex Member

    the first entry in your resolv.conf should be
    Code:
    nameserver 127.0.0.1
    check your /etc/network/interfaces and make sure there is an entry like
    Code:
    dns-nameservers 127.0.0.1
    do a network restart
    Code:
    /etc/init.d/networking restart
    it should work now
     
  11. neoszion

    neoszion New Member

    Thanks for your reply, where do I change the resolv.conf as when I change it directly it rests back to the above value?
     
  12. TiTex

    TiTex Member

    as far as i know in /etc/network/interfaces you specify the order of the nameservers with
    dns-nameservers 127.0.0.1 192.168.0.3 ... , and after a network restart is should update the /etc/resolv.conf with the values in order specified in /etc/network/interfaces .
    if this doesn't work for you check /etc/network/run/eth0 or something like that
    you can read more about this here http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/
     
    Last edited: Jun 28, 2012
  13. neoszion

    neoszion New Member

    Thanks for your posts, I am still getting the following error:

     
  14. TiTex

    TiTex Member

    how about
    Code:
    nslookup www.eden.local 
    does it give you the same error?
     
  15. neoszion

    neoszion New Member

    Yes same error :(
     
  16. TiTex

    TiTex Member

    can you post the contents of the files named.conf and pri.eden.local ?
    i'm trying to reproduce the error on a test server (ubuntu 12.04+ispconfig3) but it just doesn't happen :)
     
    Last edited: Jun 28, 2012
  17. neoszion

    neoszion New Member

    Thanks your help its appriciated.

    this is my /etc/bind/named.conf

    this is the /etc/bind/named.conf.local
    This is the /etc/bind/pri.eden.local
     
  18. TiTex

    TiTex Member

    you don't have an A record for ns1 , you can solve this by adding a record like this
    Code:
    ns1 3600 A 192.168.0.3
    or replace
    Code:
    eden.local. 3600 NS ns1.eden.local.
    with
    Code:
    eden.local. 3600 NS eden.local.
    or something else your server will respond to ... like localhost
     
  19. neoszion

    neoszion New Member

    Thanks that worked a treat. But I cant seem to be able add sub domains to different sites. For example:

    testing.eden.local
     
  20. neoszion

    neoszion New Member

    Also my /etc/bind/pri.eden.local is getting overwritten on reboot?
     

Share This Page