CENTOS Rel 5.6 - Getting DNS to work correctly

Discussion in 'Installation/Configuration' started by VK3TY, Jun 13, 2011.

  1. VK3TY

    VK3TY New Member

    Folks,

    Background:-
    • CentOS 5.6 (Red Hat Nash 5.1.19.6) being setup as a server. I have been trying to get this to work for some time. Despite having read up on the subject using several references (Red Hat 8, Fedora 4, Fedora 5 and DNS and BIND) as no doubt you may have guessed, several on-line resourses I still find I am struggling.
    • Netgear DGN200 - Modem Router: provides Wireless, 4 LAN ports, DNS and DHCP support.
    Challenge:-
    • Web hosting
    • Mail hosting
    • DHCP (IP assignment) - 192.168.10/24
    • Domain Name resolution - vk3ty.lan
    Problem:
    • Unable to assign the correct server host address. I have assigned 192.168.10.150 but, if I ping the hostname, it comes back with 192.168.10.150 which is good. It has the correct local domain name too. At least that part works. If I nslookup the domain name, it comes back with the router address 192.168.10.1 and not the server IP;-
      [root@vk3tysvr ~]# nslookup vk3ty.lan
      Server: 192.168.10.1
      Address: 192.168.10.1#53

      ** server can't find vk3ty.lan: NXDOMAIN
    • the /etc/resolv.conf file (despite my attempts to manually re-assign to point at 192.168.10.150 as the nameserver) still points to 192.168.10.1.

    ; generated by /sbin/dhclient-script
    nameserver 192.168.10.1
    search vk3ty.lan

    FIles:
    /etc/named.conf
    // BIND configuration file
    options {
    directory "/var/named";
    pid-file "/var/named/named.pid";
    };

    zone "vk3ty.lan" in {
    type master;
    file "db.vk3ty.lan";
    };

    zone "10.168.192.in-addr.arpa" in {
    type master;
    file "db.192.168.10";
    };

    zone "0.0.127.in-addr.arpa" in {
    type master;
    file "db.127.0.0";
    };

    zone "." in {
    type hint;
    file "db.cache";

    };​

    /var/named/db.127.0.0
    $TTL 3h
    @ IN SOA vk3tysvr.vk3ty.lan. nick.nybblesnbytes.net. (
    20110613001 ; Serial
    3h ; Refresh after 3 hours
    1h ; Retry after 1 hour
    1w ; Expire after 1 week
    1h ) ; Negative caching TTL of 1 hour

    IN NS vk3tysvr.vk3ty.lan.

    1 IN PTR localhost.


    /var/named/db.192.168.10
    $TTL 3h
    ;
    ; Origin added to names not ending in a dot: 10.168.192.in-addr.arpa
    ;

    @ IN SOA vk3tysvr.vk3ty.lan. nick.nybblesnbytes.net. (
    20110613001 ; Serial
    3h ; Refresh after 3 hours
    1h ; Retry after 1 hour
    1w ; Expire after 1 week
    1h ) ; Negative caching TTl of 1 hour

    ;
    ; Name servers (The name @ is implied)
    ;
    IN NS vk3tysvr.vk3ty.lan.

    ;
    ; Addresses point to canonical names
    ;
    150 IN PTR vk3tysvr.vk3ty.lan.


    /var/named/db.cache
    <Too long to ensert>​

    /var/named/db.vk3ty

    $TTL 86400
    @ SOA vk3tysvr nick.nybblesnbytes.net. (
    20110613001 ; Serial
    3h ; Refresh after 3h
    1h ; Retry after 1 hour
    1w ; Expire after 1 week
    1h ) ; Negative caching TTl of 1 hour
    NS vk3tysvr



    /var/named/db.vk3ty.lan

    $TTL 3h
    ;
    ; Origin added to names not ending in a dot: vk3ty.lan
    ;

    @ IN SOA vk3tysvr nick.nybblesnbytes.net. (
    20110613001 ; Serial
    3h ; Refresh after 3 hours
    1h ; Retry after 1 hour
    1w ; Expire after 1 week
    1h ) ; Negative caching TTl of 1 hour

    ;
    ; Name servers (The name @ is implied)
    ;
    IN NS vk3tysvr

    ;
    ; Address for cannonical names
    ;
    localhost IN A 127.0.0.1
    vk3tysvr IN A 192.168.10.150

    ;
    ; Aliases
    ;
    www IN CNAME vk3tysvr ; HTTP server
    mail IN CNAME vk3tysvr ; Mail server


    I trust someone might be able to suggest why;-
    1. What I might have done wrong with the above files.
    2. Why /etc/resolv.conf gets reset

    Sorry for the long description but it will help you understand the situation and what I want to achieve.

    Thanks (in advance),
    Nick
     

Share This Page