LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-13-2012, 01:33 PM   #1
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Rep: Reputation: Disabled
Why doesn't subdomains work?


Hello guys,

I'm new here and I'm facing a problem with Bind9 DNS server.

Since I don't use cPanel nor I want to buy it I got to install a DNS server by myself to add subdomains & nameservers to my domain ( which points to the VPS ).

Everything has been installed fine and it works except that subdomain & nameservers doesn't unless I run with "@127.0.0.1", I mean "dig @127.0.0.1 DOMAIN_NAME".

When I run nslookup I get this:

Quote:
> ns1.neoplaygrounds.com
Server: 8.8.8.8
Address: 8.8.8.8#53

** server can't find ns1.neoplaygrounds.com: NXDOMAIN

> ns2.neoplaygrounds.com
Server: 8.8.8.8
Address: 8.8.8.8#53

** server can't find ns2.neoplaygrounds.com: NXDOMAIN

> cp.neoplaygrounds.com
Server: 8.8.8.8
Address: 8.8.8.8#53

** server can't find cp.neoplaygrounds.com: NXDOMAIN
When I run dig this way "dig cp.neoplaygrounds.com":

Quote:
; <<>> DiG 9.7.3 <<>> cp.neoplaygrounds.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 29609
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; AUTHORITY SECTION:
neoplaygrounds.com. 223 IN SOA ns1.no1http.com. webhost.no1servers.com. 2012100501 86400 7200 3600000 86400

;; Query time: 9 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Oct 14 00:31:01 2012
;; MSG SIZE rcvd: 106
The same appears for nameservers.

But when I run dig this way "dig @127.0.0.1 cp.neoplaygrounds.com" I get this:

Quote:
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28743
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; ANSWER SECTION:
cp.neoplaygrounds.com. 604800 IN A 127.0.0.1

;; AUTHORITY SECTION:
neoplaygrounds.com. 604800 IN NS ns1.neoplaygrounds.com.
neoplaygrounds.com. 604800 IN NS ns2.neoplaygrounds.com.

;; ADDITIONAL SECTION:
ns1.neoplaygrounds.com. 604800 IN A 127.0.0.1
ns2.neoplaygrounds.com. 604800 IN A 127.0.0.2

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Oct 14 00:31:56 2012
;; MSG SIZE rcvd: 123
The same for nameservers, again.

I can't seem to figure out what is wrong.

Here is neoplaygrounds.db:

Quote:
;
; BIND data file for neoplaygrounds.com
;
$TTL 604800
@ IN SOA ns1.neoplaygrounds.com. neoplaygrounds.com. (
2007011501 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800 ) ; Default TTL
;
@ IN NS ns1.neoplaygrounds.com.
@ IN NS ns2.neoplaygrounds.com.
neoplaygrounds.com. IN A 127.0.0.1
ns1 IN A 127.0.0.1
ns2 IN A 127.0.0.2
www IN CNAME neoplaygrounds.com.
mail IN A 127.0.0.1
ftp IN A 127.0.0.1
neoplaygrounds.com. IN TXT "v=spf1 ip4:127.0.0.1 a mx ~all"
mail IN TXT "v=spf1 a -all"
cp IN A 127.0.0.1
And 127.0.0.rev:

Quote:
$ORIGIN 0.0.127.IN-ADDR.ARPA.
$TTL 1d
@ IN SOA ns1.neoplaygrounds.com. dns.neoplaygrounds.com. (
2007011501
7200
120
2419200
604800
)
IN NS ns1.neoplaygrounds.com.
IN NS ns2.neoplaygrounds.com.
10 IN PTR ns1.neoplaygrounds.com.
20 IN PTR ns2.neoplaygrounds.com.
If someone could help me, I'd thank you much
 
Old 10-15-2012, 06:28 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
There might be more than one problem here. The first thing that leaps out is that you should not be using the address 127.0.0.1 for *anything*. That is called the "loopback address", and is probably declared elsewhere in your system as the address corresponding to "localhost". The IP address you should be using for real DNS names is the one assigned to your VPS network interface. A special property of this loopback address is that is is not allowed out onto the Internet; it is termed a Martian address (named for the University of Mars, a long time ago).

The other piece of information necessary to fully understand your setup is the configuration file used to start named. Depending on your setup, this is either found in /etc/named.conf, or buried in some chroot environment where your named is confined. That file will tell you (and us) what zones are defined for your named, and where the details are kept.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Hangout doesn't work, and Mplayer doesm't work without -ao alsa flagGoogle H ranban282 Linux - Software 0 02-20-2012 04:23 AM
Keyboard doesn't work right click on mouse doesn't work ramblinrick Linux Mint 2 10-15-2010 01:10 AM
DNS lookup doesn't work, ping, firefox will not work properly lovemov Linux - Networking 2 04-23-2009 02:30 PM
make wildcard subdomains on localhost work edman007 Linux - Networking 5 09-03-2005 01:41 PM
logout in x doesn't work and nvidia doesn't boot Meriadoc Linux - Newbie 2 06-18-2004 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration