Solved

Domain name problem

Posted on 2004-11-01
320 Views
Last Modified: 2010-03-18
I use comcast cable internet with a D-Link DI-514 router setup to forward port 80 and port 53 to a local machine who's static ip is 192.168.0.100. On 192.168.0.100 i have apache 2 and bind 9 running.

I have my domain name setup with the primary nameserver set to my external ip (ns1.dirtywerm.com 67.167.166.50).

It seems like bind is working fine locally but not externally. I'm am new to working with bind though.

If you go to 67.167.166.50 or ns1.dirtywerm.com the default apache page comes up.

I've been trying to use dig to figure out whats going on but I am also not very familiar with using it.

Using dig on ns1.dirtywerm.com shows that its pointing to the right ip.

Using dig on 67.167.166.50 comes up with some wierd results. It looks like its not accessing my local bind server.

So what I'm asking is how to get my domain name dirtywerm.com to use the nameserver ns1.dirtywerm.com (67.167.166.50) to access my local dns server.
0
Question by:dirtywerm
    15 Comments
     

    Author Comment

    by:dirtywerm
    Here is the dig output that is confusing me (ran from a remote location):

    [dirtywerm@sprout dirtywerm]$ dig 67.167.166.50

    ; <<>> DiG 9.2.1 <<>> 67.167.166.50
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18340
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;67.167.166.50.                 IN      A

    ;; AUTHORITY SECTION:
    .                       10800   IN      SOA     A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2004110100 1800 900 604800 86400

    ;; Query time: 81 msec
    ;; SERVER: 64.29.16.113#53(64.29.16.113)
    ;; WHEN: Mon Nov  1 14:35:00 2004
    ;; MSG SIZE  rcvd: 106
    0
     
    LVL 36

    Expert Comment

    by:grblades
    Hi dirtywerm,
    Can you post a name which I can lookup which should be using your DNS server.
    Did you make sure that port 53 you redirected was UDP?
    0
     

    Author Comment

    by:dirtywerm
    dirtywerm.com should be using ns1.dirtywerm.com which should be using my DNS server.

    Port 53 is redirected using UDP.
    0
     
    LVL 36

    Expert Comment

    by:grblades
    It looks like the port is not being redirected correctly or there is a problem with the bind configuration.

    Can you post the output of 'netstat -n -p -l'
    0
     

    Author Comment

    by:dirtywerm
    dirtywerm.com's nameservers are ns1.dirtywerm.com and ns2.dirtywerm.com

    Both ns1 and ns2 point to 67.167.166.50 so it should definately be accessing my dns server
    0
     

    Author Comment

    by:dirtywerm
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      22246/smbd
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      5589/apache2
    tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      25850/named
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      5575/sshd
    tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      25850/named
    tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      22246/smbd
    udp        0      0 192.168.0.100:137       0.0.0.0:*                           22249/nmbd
    udp        0      0 0.0.0.0:137             0.0.0.0:*                           22249/nmbd
    udp        0      0 192.168.0.100:138       0.0.0.0:*                           22249/nmbd
    udp        0      0 0.0.0.0:138             0.0.0.0:*                           22249/nmbd
    udp        0      0 127.0.0.1:53            0.0.0.0:*                           25850/named
    udp        0      0 0.0.0.0:33097           0.0.0.0:*                           25850/named
    udp        0      0 127.0.0.1:32970         0.0.0.0:*                           22262/smbd
    Active UNIX domain sockets (only servers)
    Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
    unix  2      [ ACC ]     STREAM     LISTENING     13255  7334/artsd          /tmp/mcop-jeremy/pos_homenetwork-1ca6-41800388
    unix  2      [ ACC ]     STREAM     LISTENING     13201  7323/kdeinit: klaun /tmp/ksocket-jeremy/klauncherPT8w1a.slave-socket
    unix  2      [ ACC ]     STREAM     LISTENING     13305  7339/kdeinit: ksmse /tmp/.ICE-unix/7339
    unix  2      [ ACC ]     STREAM     LISTENING     229583 13127/artsd         /tmp/mcop-root/pos_homenetwork-3347-41806139
    unix  2      [ ACC ]     STREAM     LISTENING     6997   6147/dcopserver     /tmp/.ICE-unix/dcop6147-1098904925
    unix  2      [ ACC ]     STREAM     LISTENING     6281   5710/apache2        /var/run/cgisock
    unix  2      [ ACC ]     STREAM     LISTENING     13141  7293/X              /tmp/.X11-unix/X0
    unix  2      [ ACC ]     STREAM     LISTENING     7059   6257/dcopserver     /tmp/.ICE-unix/dcop6257-1098904940
    unix  2      [ ACC ]     STREAM     LISTENING     15862  10659/kdesud        /tmp/ksocket-jeremy/kdesud_:0
    unix  2      [ ACC ]     STREAM     LISTENING     13174  7318/kdeinit: Runni /tmp/ksocket-jeremy/kdeinit__0
    unix  2      [ ACC ]     STREAM     LISTENING     13176  7318/kdeinit: Runni /tmp/ksocket-jeremy/kdeinit-:0
    unix  2      [ ACC ]     STREAM     LISTENING     13182  7321/kdeinit: dcops /tmp/.ICE-unix/dcop7321-1098908550
    0
     
    LVL 36

    Expert Comment

    by:grblades
    Yes that is all correct. The root servers are giving the correct information and also supplying the IP addresses for ns1.dirtywerm.com.

    The problem is that your nameserver is not responding. Can you run the command I mentioned previously and also post your named.conf configuration file for bind.
    0
     

    Author Comment

    by:dirtywerm
    named.conf

    options {
            directory "/var/bind";

            listen-on-v6 { none; };
            listen-on { 127.0.0.1; };

            pid-file "/var/run/named/named.pid";
    };

    zone "." IN {
            type hint;
            file "named.ca";
    };

    zone "localhost" IN {
            type master;
            file "pri/localhost.zone";
            allow-update { none; };
            notify no;
    };

    zone "127.in-addr.arpa" IN {
            type master;
            file "pri/127.zone";
            allow-update { none; };
            notify no;
    };

    zone "dirtywerm.com" IN {
            type master;
            file "pri/dirtywerm.zone";
            allow-update { none; };
            notify no;
    };
    0
     

    Author Comment

    by:dirtywerm
    dirtywerm.zone

    $TTL 1W
    @       IN      SOA     ns1.dirtywerm.com. root.dirtywerm.com.  (
                                          20041028   ; Serial
                                          28800      ; Refresh
                                          14400      ; Retry
                                          604800     ; Expire - 1 week
                                          86400 )    ; Minimum

    @               IN      NS      ns1.dirtywerm.com.
    @               IN      A       67.167.166.50
    ns1             IN      A       67.167.166.50
    www             IN      A       67.167.166.50
    localhost       IN      A       127.0.0.1
    0
     

    Author Comment

    by:dirtywerm
    I'm not sure about the dirtywerm.zone file, I keep on switching between using 67.167.166.50 and 192.168.0.100

    I am also not sure if my resolv.conf file is correct

    resolv.conf
    domain dirtywerm.com
    nameserver 127.0.0.1

    Should I set nameserver to ns1.dirtywerm.com??
    0
     
    LVL 36

    Accepted Solution

    by:
    >         listen-on { 127.0.0.1; };
    This is your problem as it is only listening for queries on the loopback address.

    Assuming your machines IP address is 192.168.1.1 you would change the line to:-
            listen-on { 127.0.0.1; 192.168.1.1; };

    Restart bind and it should now work.
    0
     
    LVL 36

    Expert Comment

    by:grblades
    Your resolv.conf looks fine. 127.0.0.1 basically means 'this machine'.
    0
     

    Author Comment

    by:dirtywerm
    Thanks!!! its working now
    0
     

    Author Comment

    by:dirtywerm
    Just another quick question if you don't mind. When I go to http://www.dirtywerm.com on any of the local computers it says

    401 The web site is blocked by administrator

    Any idea why that would be?
    0
     

    Author Comment

    by:dirtywerm
    Sorry, Ignore that last question. I didn't restart the nameserver. Everything is working now.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Product Review - Android Remix

    Come along for the ride with our Senior Product Manager, Brian Matis, as he reviews the Android Remix.

    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…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    877 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

    19 Experts available now in Live!

    Get 1:1 Help Now