• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

Domain name problem

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
dirtywerm
Asked:
dirtywerm
  • 10
  • 5
1 Solution
 
dirtywermAuthor Commented:
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
 
grbladesCommented:
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
 
dirtywermAuthor Commented:
dirtywerm.com should be using ns1.dirtywerm.com which should be using my DNS server.

Port 53 is redirected using UDP.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
grbladesCommented:
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
 
dirtywermAuthor Commented:
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
 
dirtywermAuthor Commented:
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
 
grbladesCommented:
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
 
dirtywermAuthor Commented:
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
 
dirtywermAuthor Commented:
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
 
dirtywermAuthor Commented:
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
 
grbladesCommented:
>         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
 
grbladesCommented:
Your resolv.conf looks fine. 127.0.0.1 basically means 'this machine'.
0
 
dirtywermAuthor Commented:
Thanks!!! its working now
0
 
dirtywermAuthor Commented:
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
 
dirtywermAuthor Commented:
Sorry, Ignore that last question. I didn't restart the nameserver. Everything is working now.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now