Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nameserver not visible, or not answering queries
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Fri May 07, 2004 4:19 am    Post subject: nameserver not visible, or not answering queries Reply with quote

Well, what I thought was correct from the tutorials apparently isn't. I'm sure the same people will reply, so maybe they can find the error in this-

I have a cable modem, IP 24.121.34.160. The modem goes to a WiFi router, so I can have fun with WiFi. It acts as a gateway, 192.168.1.1. The router connects to a switch, for those unfortunates who don't have a wireless card. The machine is plugged in to that switch, hard coded IP of 192.168.1.2. (The DHCP range starts at 192.168.1.100).

I went to godaddy, where my domain is registered, and I told it to use me as the primary nameserver (24.121.34.160) It accepted the changes, but my nameserver isn't answering. I'm fairly certain it's possible to run a ns off a router, (NAT I think it's called), but if not, I can get another IP devoted just to the linux machine.

In order to preclude any possible questions, I'm going to post all the files that I believe are relevant.

Code:

/etc/conf.d/net
iface_eth0="192.168.1.2 broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.1.1"


Code:

/etc/bind/named.conf
options {
  directory "/var/bind";
  listen-on-v6 {none; };
  listen-on- { 127.0.0.1; 192.168.1.1; 24.121.34.160; };
  pid-file "/var/run/named/named.pid";
};

controls {
  inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
};

key "rndc_key" ....

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

zone "0.0.127.in-addr.arpa" {
  type master;
  file "pri/127.zone";
};

zone "crymson.org" {
  type master;
  file "pri/crymson.org";
};

zone "1.168.192.in-addr.arpa" {
  type master;
  file "pri/1.168.192.zone";
};


Code:

127.zone

$TTL 3D
@      IN   SOA   ns.crymson.org. hostmaster.crymson.org.  (
               2002081601 ; Serial
               28800      ; Refresh
               14400
               604800
               86400 )
         NS   ns.crymson.org.

1         PTR   localhost.


Code:

crymson.org

$TTL 3D
@      IN   SOA   ns.crymson.org. hostmaster.crymson.org.  (
   ... lalala )
         TXT   "Crymson.org, our heads a splode"
         NS   ns
         MX   10 mail.crymson.org.

localhost      A   127.0.0.1
www         CNAME   ns
mail         CNAME   ns
ftp         CNAME   ns


Code:

1.168.192.zone

$TTL 3D
@      IN   SOA   ns.crymson.org. hostmaster.crymson.org. (
   .... lalalala )
         NS   crymson.org.
160.34.121.24.in-addr.arpa   IN   PTR   ns.crymson.org.


*whew* Now, obviously something is wrong, since it isn't accepting queries, or isn't replying. If someone can point the error of my ways, I would be MOST appreciative. I think I'm very close, just need the "final nail in the coffin" as it were.

Thanks!!!
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
TheDweller
n00b
n00b


Joined: 30 Jan 2004
Posts: 20
Location: Sydney, Australia

PostPosted: Fri May 07, 2004 5:17 am    Post subject: Reply with quote

Well, I tried connecting to your IP and theres no response from theDNS server. So either you havent started the named service, or you havent set up the port forwarding properly.

From memory, you must forward TCP and UDP to the port 53 of the DNS server.
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Fri May 07, 2004 5:41 am    Post subject: Reply with quote

named is starting, and running, I've already verified that.

TCP and UDP port 53 are now forwarded to the server.
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
To
Veteran
Veteran


Joined: 12 Apr 2003
Posts: 1145
Location: Coimbra, Portugal

PostPosted: Fri May 07, 2004 8:52 am    Post subject: Reply with quote

Even if you foward port 53 to your computer it doesn't work correctly, cause the IP's 192.168.1.1 and 24.121.34.160 aren't from your computer but from the switch. You could configure your named to lissin on 192.168.1.2, that's his IP, and foward the traffic from the switch to it.


_________________

------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------
Back to top
View user's profile Send private message
kezzla
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 253
Location: Austin, TX

PostPosted: Fri May 07, 2004 5:47 pm    Post subject: Reply with quote

To be more specific:

Change this:
listen-on- { 127.0.0.1; 192.168.1.1; 24.121.34.160; };
To this:
listen-on- { 127.0.0.1; 192.168.1.2; };

DNS queries are strictly UDP so you only need to forward UDP from your router to your linux server at 192.168.1.2. You also might want to add primary/reverse zones for your domain if you are going to be authoritative.. ;-)
Back to top
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Fri May 07, 2004 6:53 pm    Post subject: Reply with quote

It looks to me like your server is up, but misconfigured. I tried the following:

nslookup
> server 24.121.34.160
> microsoft.com

I got:

Server: cm-24-121-34-160.flagstaff.az.npgco.com
Address: 24.121.34.160

*** Request to cm-24-121-34-160.flagstaff.az.npgco.com timed-out

If your server wasn't up, the server command would have failed.

Look in your log for more info.[/quote]
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Fri May 07, 2004 9:03 pm    Post subject: Update... Reply with quote

Ok, I changed the line in named.conf, to reflect the earlier suggestion. I also took another look at my wiring, turns out I had one thing all screwed up, and I fixed it.

But, from my winbloz machine, I still can't ping/tracert to x.crymson.org (whether x is ns, www, ftp, mail)

Would some soul out there try to connect again, and see if something else is screwy? I also changed the port forwarding to just be UDP on port 53 to 192.168.1.2.

As for the suggestion of reverse zones, I thought I already did that? Isn't that what the 0.0.127.in-addr.arpa zone files do? I suppose a better question would be, which address do I need to reverse zone lookup for? :)

There's a lot of information here to get right, and I really appreciate you working with me on it.
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
kezzla
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 253
Location: Austin, TX

PostPosted: Fri May 07, 2004 9:38 pm    Post subject: Reply with quote

I tried it again, same result. Your server responds, but is unable to query anything.

For me it just hangs >>
# nslookup
# server 24.121.34.160
> 127.0.0.1
;; connection timed out; no servers could be reached

A good way to troubleshoot errors now would be through your logs.
Stop named, clear logfile, start named and check for errors when zones are loading. It will tell you line numbers and such..good stuff. Post it here if you like.

Edit your resolv.conf to have:
nameserver 127.0.0.1
domain <yourdomain.com>

Then do:
# nslookup msn.com
# nslookup 127.0.0.1
See what answers you get back.

FIX: crymson.org
$TTL 3D
@ IN SOA ns.crymson.org. hostmaster.ns.crymson.org. (
... lalala )
TXT "Crymson.org, our heads a splode"
NS ns
MX 10 mail.crymson.org.
localhost IN A 127.0.0.1
loopback IN CNAME localhost
ns IN A 24.124.34.160
www IN CNAME ns
mail IN CNAME ns
ftp IN CNAME ns

You need to add proper reverse zone for your public IP.
zone "34.124.24.in-addr.arpa" in {
type master;
file "34.124.24.zone";
};

34.124.24.zone
$TTL 3D
@ IN SOA ns.crymson.org. hostmaster.ns.crymson.org. (
.... lalalala )
NS crymson.org.
160 IN PTR ns.crymson.org.
Back to top
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Fri May 07, 2004 10:01 pm    Post subject: Reply with quote

Try this:

dig crymson.org +trace

You'll see that it goes into an infinite loop bouncing back and forth between the following:

Code:
crymson.org.            86400   IN      NS      ns2.npgco.com.
crymson.org.            86400   IN      NS      ns.crymson.org.
;; Received 92 bytes from 204.74.113.1#53(TLD2.ULTRADNS.NET) in 19 ms
 
org.                    172427  IN      NS      TLD1.ULTRADNS.NET.
org.                    172427  IN      NS      TLD2.ULTRADNS.NET.
;; Received 79 bytes from 207.192.213.22#53(ns2.npgco.com) in 57 ms
 


That's one of your problems. I'm not sure how to fix it though.

The other problem is that your DNS server doesn't seem to work if I connect directly to it. Can you run DNS queries directly from your own server? Try this:

nslookup

When it starts, make sure it says the default server is localhost. If not use the following command:

> server 127.0.0.1

Then enter:

> microsoft.com

Does that resolve? If not, fix that first. Make sure you can resolve 127.0.0.1, crymson.org, and x.crymson.org
Back to top
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Fri May 07, 2004 10:05 pm    Post subject: Reply with quote

Another problem is that your domain is listed as having two name servers:

ns2.npgco.com and
ns.crymson.org

ns2.npgco.com doesn't have any records for your domain.
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Fri May 07, 2004 11:44 pm    Post subject: Reply with quote

Yes, I know that ns2.npgco.com doesn't have any. I haven't set up secondary DNS yet. godaddy won't let me change only one of the nameservers, so I'm just trying to get my primary to work first, then worry about setting up secondary.

I put that one in, for no other reason than to pacify godaddy. So that explains that.

I'll get to work on the other stuff right now. Thanks again guys!!
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Fri May 07, 2004 11:48 pm    Post subject: Reply with quote

kezzla wrote:

Edit your resolv.conf to have:
nameserver 127.0.0.1
domain <yourdomain.com>

Then do:
# nslookup msn.com
# nslookup 127.0.0.1
See what answers you get back.


Done, here are the results:

Code:

>nslookup msn.com
Server:  127.0.0.1
Address:  127.0.0.1#53

Non-authoritative answer:
Name:  msn.com
Address:  207.68.172.246

>nslookup 127.0.0.1
Server: Same as above

1.0.0.127.in-addr.arpa name = localhost.

_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sat May 08, 2004 12:00 am    Post subject: Reply with quote

kpack wrote:
The other problem is that your DNS server doesn't seem to work if I connect directly to it. Can you run DNS queries directly from your own server? Try this:

nslookup

When it starts, make sure it says the default server is localhost. If not use the following command:

> server 127.0.0.1

Then enter:

> microsoft.com

Does that resolve? If not, fix that first. Make sure you can resolve 127.0.0.1, crymson.org, and x.crymson.org


Yes, 127.0.0.1 is the default server. microsoft.com resolves, per the above reply, about msn.com.

It does not however, resolve crymson.org, or x.crymson.org

I also made the changes to the "crymson.org" zone file per the upper post, as well as adding the 34.121.24.in-addr.arpa stuff to named.conf, and the zone file.

I've done what was requested, and I can look stuff up, but people still can't seem to connect to me. Thanks for your patience...
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
kezzla
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 253
Location: Austin, TX

PostPosted: Sat May 08, 2004 2:05 am    Post subject: Reply with quote

Ok you are almost there ;-)

One thing I forgot was you need to add this to your crymson.org zone file:
crymson.org. IN A 24.121.34.160

And lastly so the rest of the world can view you, contact the folks you registered your domain with. You might have web access to modify DNS server settings.

Doing a "# whois crymson.org" yields these to be your nameservers:
Name Server:NS2.NPGCO.COM
Name Server:NS.CRYMSON.ORG

The problem is that NS2.NPGCO.COM knows nothing of crymson.org. You may need to remove that name server from the list. When this is done it can take up to 48 hours for this change to replicate.
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sat May 08, 2004 3:43 am    Post subject: Reply with quote

kezzla wrote:
Ok you are almost there ;-)

One thing I forgot was you need to add this to your crymson.org zone file:
crymson.org. IN A 24.121.34.160


Ok, all taken care of.

kezzla wrote:
And lastly so the rest of the world can view you, contact the folks you registered your domain with. You might have web access to modify DNS server settings.

Doing a "# whois crymson.org" yields these to be your nameservers:
Name Server:NS2.NPGCO.COM
Name Server:NS.CRYMSON.ORG

The problem is that NS2.NPGCO.COM knows nothing of crymson.org. You may need to remove that name server from the list. When this is done it can take up to 48 hours for this change to replicate.


Yes, I know, but I had to change it something else, as I couldn't change my primary NS to ns.crymson.org, and leave secondary as park7.secureserver.net- As I said before, I don't have anyone to act as secondary DNS. I will soon, hopefully, but since ns.crymson.org is the PRIMARY DNS server, shouldn't it not matter? If my system is up and running, then it should never need to contact ns2.npgco.com. I know that my system won't be up 100% of the time, so I see the value in having secondary DNS, but for my purposes now, I just want to make sure that my primary is working, before I worry about secondary. I hope that makes my intentions a little bit clearer.

Thanks again for the help...
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
kezzla
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 253
Location: Austin, TX

PostPosted: Sat May 08, 2004 4:19 am    Post subject: Reply with quote

Well I'm not 100% on this, but I believe that it tries the 2nd listed DNS server if the first one is NOT available or answering. Thus people on the outside will always get responses from the nameserver that knows nothing of crymson.org. So you will want to at least change the order so your nameserver "ns.crymson.org" is listed first.
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sat May 08, 2004 5:37 am    Post subject: Nameserver Summary Reply with quote

I just checked what godaddy has for my nameserver setup, and they say that my primary (nameserver 1) NS is ns.crymson.org, and my secondary (nameserver 2) is ns2.npgco.com. I don't have a nameserver 3.

It will not let me only have one nameserver.

So, should I simply change the order around, and wait another 48 hours? I was thinking, that if my ns is working, then it would never get to ns2.npgco.com, since mine would be answering/working correctly. Since it is getting referred to ns2.npgco.com, something is obviously still not set correctly in my computer. Either that, or all you guys trying to help me out just have the information cached, so it's just assuming you want to connect to the secondary ns.

I guess I'll do whatever you recommend. If you think I should change them, and wait two days, I will.
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
kezzla
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 253
Location: Austin, TX

PostPosted: Sat May 08, 2004 5:59 am    Post subject: Reply with quote

w00t ! It appears to be working perfectly.
See below:

Code:
predaking root # nslookup
> set debug
> crymson.org
Server:         127.0.0.1
Address:        127.0.0.1#53

------------
    QUESTIONS:
        crymson.org, type = A, class = IN
    ANSWERS:
    ->  crymson.org
        internet address = 24.121.34.160
    AUTHORITY RECORDS:
    ->  crymson.org
        nameserver = ns.crymson.org.
    ADDITIONAL RECORDS:
    ->  ns.crymson.org
        internet address = 24.121.34.160
------------
Non-authoritative answer:
Name:   crymson.org
Address: 24.121.34.160


As you can see: ns.crymson.org is answering like it should, so godaddy was correct. Strange that whois lists them in reverse order
:?:
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sat May 08, 2004 6:13 am    Post subject: Reply with quote

w00t is right! This is awesome-

So now that I have DNS working, I already emerged apache. I obviously want to set up email/ftp/web - but I'll work on it one step at a time.

I'm just guessing now, but I need to configure apache, put my web page up, and people type in www.crymson.org, and they'll get my webpage. Along the same lines, once I set up ftp/email, they can connect to mail.crymson.org, and ftp.crymson.org, and it'll direct them to appropriate program?

Basically, my DNS is set up correctly, so now I just need to configure the appropriate services?

Again, thanks so much for your help!!!
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
kezzla
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 253
Location: Austin, TX

PostPosted: Sat May 08, 2004 6:15 am    Post subject: Reply with quote

You are EXACTLY right :mrgreen: !!
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sat May 08, 2004 7:42 am    Post subject: Requests timing out again... Reply with quote

Ok, noone can seem to get through. I set up apache, and it's being weird from inside my network (more on that later) yet noone can connect. I had a friend try to connect to www.crymson.org - it timed out. He ran host www.crymson.org and got the following:

host www.crymson.org
www.crymson.org is an alias for ns.crymson.org.
ns.crymson.org has address 24.121.34.160

So, I think the ns is working, it just happens to be ignoring every request that gets sent its way.

Since I have the server plugged in to my router, so I need to forward all ports to the server? And if I do that, won't it really screw up using my laptop via dhcp? (In other words, if all traffic is forwarded to the linux machine, will my computer still function at all?)

Am I missing something else?

On a side note- when I try to connect to www.crymson.org from within my own network, I get connected to the router. The same goes if I try to connect directly to my IP (24.121.34.160). Yet, if I type http://192.168.1.2, I get the apache page. Is there some reason that within my network, I'm getting pointed to the router (192.168.1.1)?
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sat May 08, 2004 7:47 am    Post subject: Reply with quote

Weird... so I set up port forwarding, and now it's behaving. Weird. So, looks like I gotta set up port forwarding for port 80, 21 (23 for ssh), and 25 for mail. Then it'll work. What a pain.
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sat May 08, 2004 10:12 am    Post subject: Mail Server choices... Reply with quote

I've figured out that I need a good MTA for my domain. I've looked at qmail, squirrelmail, and a few others, and I really can't tell one from another. Perhaps if I list my intentions, someone can narrow it down for me.

As you all already know, I have crymson.org. I want to dish out email addresses from there for myself, friends, family, etc. I want them to be able to connect using any mail client they want, simply by giving their l/p to mail.crymson.org.

I don't know if my ISP blocks port 25 incoming, but I'm sure I'll figure it out real quick when I try to set it up. I'd rather it not be a relay server, I'd much rather handle all this stuff on my own.

So, with that kind of setup in mind, which MTA is best for me? I could easily see running around 20-25 email accounts, so ease of management/maintenance is a good thing.
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
kezzla
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 253
Location: Austin, TX

PostPosted: Sat May 08, 2004 2:14 pm    Post subject: Reply with quote

My reccomendations:
MTA: Postfix
Webmail: Squirrelmail
IMAP: Courier-Imap

It's what I use and is rather easy to maintain and setup.
Might want to start a new thread for mail stuff ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum