Page 14 of 16 FirstFirst ... 41213141516 LastLast
Results 131 to 140 of 152

Thread: Howto: Setup a DNS server with bind

  1. #131
    Join Date
    May 2010
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Setup a DNS server with bind

    Thank You!

    I found your post really useful

    I had been going nuts for a day trying to get my home network to use our Linux server as a DNS cache...the Linux machines were happy! getting the WinXP machine to play nicely was another story!

    I also found this article useful (for anyone else who is looking for additional examples)
    http://lani78.wordpress.com/2008/08/...local-network/

    Cheers

  2. #132
    Join Date
    Nov 2006
    Location
    George, South Africa
    Beans
    68
    Distro
    Ubuntu 10.04 Lucid Lynx

    Exclamation Re: Howto: Setup a DNS server with bind

    Quote Originally Posted by hogman23 View Post
    One more step to get it to work:
    You must rename the named.conf.local to named.conf
    Not so, these are two different files and they both exist for a reason.

    There are three named.conf files in /etc/

    named.conf
    named.conf.local
    named.conf.options

    They are all used, it's just defferent parts of the config that is stored in each.

    R 8)

  3. #133

    Re: Howto: Setup a DNS server with bind

    Could somebody please help me?

    I'm not sure how to trouble shoot this.

    I setup bind9 with webmin but gave up on that and tried to edit the files manually.

    Now from a root logon on the ubuntu 9.10 server I get

    ---------------------------------------------
    root@ice:/etc/bind/zones# nslookup ice.7rocks.com.
    Server: 127.0.0.1
    Address: 127.0.0.1#53

    ** server can't find ice.7rocks.com: SERVFAIL
    ---------------------------------------------

    Checked if bind is up and running
    ---------------------------------------------
    root@ice:/etc/bind/zones# ps -ef|grep [n]amed
    bind 4259 1 0 11:04 ? 00:00:00 /usr/sbin/named -u bind
    ---------------------------------------------

    Doing the dig thing I get
    ---------------------------------------------
    root@ice:/etc/bind/zones# dig ice.7rocks.com.

    ; <<>> DiG 9.6.1-P2 <<>> ice.7rocks.com.
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 58059
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;ice.7rocks.com. IN A

    ;; Query time: 0 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Wed Sep 15 11:18:24 2010
    ;; MSG SIZE rcvd: 32
    ---------------------------------------------


    Contents of /etc/resolve.conf are :
    ---------------------------------------------
    # Generated by NetworkManager
    nameserver 127.0.0.1
    ---------------------------------------------

    The contents of 7rocks.com.db
    ---------------------------------------------
    // replace example.com with your domain name. do not forget the . after the dom$
    // Also, replace ns1 with the name of your DNS server

    7rocks.com. IN SOA ice.7rocks.com. dion.7rocks.com. (
    10118 ; Serial
    43200 ; Refresh
    3600 ; Retry
    3600000 ; Expire
    2592000 ) ; Minimum

    // Replace the following line as necessary:
    // ns1 = DNS Server name
    // mta = mail server name
    // example.com = domain name
    7rocks.com. IN NS ice.7rocks.com.
    7rocks.com. IN MX 10 mail.7rocks.com.

    // Replace the IP address with the right IP addresses.
    7rocks.com. IN A 192.168.1.3
    ice.7rocks.com. IN A 192.168.1.3
    www.7rocks.com. IN A 192.168.1.3
    mail IN A 82.98.86.173
    ice IN A 192.168.1.3

    // Aliases
    ice IN CNAME ice.7rocks.com.


    ---------------------------------------------


    The contents of rev.1.168.192.in-addr.arpa
    ---------------------------------------------
    //replace example.com with yoour domain name, ns1 with your DNS server name.
    // The number before IN PTR example.com is the machine address of the DNS serve$

    @ IN SOA ice.7rocks.com. dion.7rocks.com. (
    2006081402
    28800
    604800
    604800
    86400 )

    IN NS ice.7rocks.com.
    3.1.168.192.in-addr.arpa. IN PTR ice.7rocks.com.

    ---------------------------------------------


    Contents of /etc/bind/named.conf
    ---------------------------------------------
    //
    // Do any local configuration here
    //

    // Consider adding the 1918 zones here, if they are not used in your
    // organization
    //include "/etc/bind/zones.rfc1918";
    zone "7rocks.com" {
    type master;
    file "/etc/bind/zones/7rocks.com.db";
    };

    # This is the zone definition for reverse DNS. replace 0.168.192 with your netw$
    zone "1.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/zones/rev.1.168.192.in-addr.arpa";
    };

    ---------------------------------------------

    This DNS servers IP address is 192.168.198.3 sitting on an internal network behind an
    ADSL modem.
    The ADSL modem has an IP address of 192.168.1.1

    Anybody got any ideas?

    Regards,

    D
    Last edited by dionp2; September 15th, 2010 at 04:51 AM.

  4. #134
    Join Date
    Sep 2010
    Beans
    2

    Re: Howto: Setup a DNS server with bind

    after # dig mysite.com
    I get this:
    ; <> DiG 9.4.2-P2.1 <> mysite.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36531
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    ;; QUESTION SECTION:
    ;mysite.com. IN A
    ;; ANSWER SECTION:
    mysite.com. 0 IN A xx.xxx.xx.xxx
    ;; Query time: 214 msec
    ;; SERVER: 208.67.220.220#53(208.67.220.220)
    ;; WHEN: Wed Sep 29 12:58:08 2010
    ;; MSG SIZE rcvd: 45


    and after # ping mysite.com
    I get this:
    PING mysite.com (ip of my VPS) 56(84) bytes of data.
    64 bytes from mysite.com (ip of my VPS): icmp_seq=1 ttl=64 time=0.045 ms


    Those results are shown if I dig and ping from root of my VPS, but when I ping mysite.com from other machine (any where from internet) I get "unknown host mysite.com" how can I be shure that my zone files are correct??? there is about 24h of propagation (if that may be a problem) but I can't find mysite.com in any table (I was trying with diferent proxies and diferent tools).

  5. #135
    Join Date
    Sep 2010
    Beans
    2

    Re: Howto: Setup a DNS server with bind

    .
    Last edited by mikisr; September 30th, 2010 at 08:37 PM.

  6. #136
    Join Date
    Oct 2010
    Beans
    17
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Setup a DNS server with bind

    Deleted
    Last edited by anypundit; June 8th, 2011 at 06:40 PM. Reason: Post removed

  7. #137
    Join Date
    Nov 2010
    Beans
    1

    Re: Howto: Setup a DNS server with bind

    I have set up bind with hardly any problems. However there is yet one thing that troubles me. I connect to my ISP through aDSL modem. Each time a connection is made resolv.conf file gets modified with providers DNS servers. I have to manually remove the IPs and add my local DNS IP and search order string. Is there a way to fix this?

  8. #138
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,631
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Howto: Setup a DNS server with bind

    Quote Originally Posted by anypundit View Post
    What, if any, changes should I make to the standard db.anypundit.com to leave the 2LD alone while issuing 3LD names to my network hosts?
    The easiest solution is to replicate the external records for www.anypundit.com in your local zone file. I do this all the time when setting up internal nameservers for clients. Usually the www host record, and sometimes a "mail" record point to the external server(s) with everything else pointing inside.

    Quote Originally Posted by sash11 View Post
    I have to manually remove the IPs and add my local DNS IP and search order string. Is there a way to fix this?
    Edit (with sudo) /etc/dhcp3/dhclient.conf and remove "domain-name-servers" and "domain-search" from the list in the "request" directive. You can also muck with "prepend" and "supersede" if you like, or you can just create a static resolv.conf and disable the request for domain-name-servers and search list.

  9. #139
    Join Date
    Oct 2010
    Beans
    17
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Setup a DNS server with bind

    If you have trouble with zone file syntax like I did, try a little script called "hosts2dns". It will read your HOSTS file and translate those entries into the proper zone files. Beware and backup, as it will overwrite existing DNS entries.

  10. #140
    Join Date
    Jan 2011
    Beans
    9

    Re: Howto: Setup a DNS server with bind

    I have set up my dns server just like the original tutorial in this topic said to do. However, I can not browse to my local webserver using xserv.local or www.xserv.local.

    So I ran a test:

    C:\Users\dx>nslookup xcserv.local
    Server: UnKnown
    Address: 192.168.2.20

    *** UnKnown can't find xserv.local: Non-existent domain

    --------------------------------------------------------------------

    ja@serv:~$ dig tgcserv.local

    ; <<>> DiG 9.7.0-P1 <<>> xserv.local
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 53932
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;xserv.local. IN A

    ;; AUTHORITY SECTION:
    . 3436 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2011010700 1800 900 604800 86400

    ;; Query time: 46 msec
    ;; SERVER: 192.168.2.20#53(192.168.2.20)
    ;; WHEN: Fri Jan 7 16:00:42 2011
    ;; MSG SIZE rcvd: 106

    -----------------------------------------------------

    ja@serv:~$ nslookup ns
    Server: 192.168.2.20
    Address: 192.168.2.20#53

    ** server can't find ns: NXDOMAIN


    Any help on what file I mis-configured or what I need to do differently is greatly appreciated.
    Last edited by rededit; January 7th, 2011 at 11:07 PM.

Page 14 of 16 FirstFirst ... 41213141516 LastLast

Bookmarks

Posting Permissions

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