Jump to content

Running A Dns Server


shadowayex

Recommended Posts

Alright, so I'm trying to set up my own DNS Server on a Debian 5.0 (Lenny) distribution using Bind9.The Bind9 is set up properly and something is working because when I use the dig command on the zone I'm trying to add, I get this:

# dig @localhost www.hugdontmug.com; <<>> DiG 9.5.1-P1 <<>> @localhost www.hugdontmug.com; (2 servers found);; global options:  printcmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14325;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1;; QUESTION SECTION:;www.hugdontmug.com.		IN	A;; ANSWER SECTION:www.hugdontmug.com.	60	IN	A	209.152.71.92;; AUTHORITY SECTION:hugdontmug.com.		60	IN	NS	ns.hugdontmug.com.;; ADDITIONAL SECTION:ns.hugdontmug.com.	60	IN	A	209.152.71.92;; Query time: 1 msec;; SERVER: 127.0.0.1#53(127.0.0.1);; WHEN: Mon Apr 20 20:06:39 2009;; MSG SIZE  rcvd: 85

But when I run sudo named-checkzone hugdontmug.com /etc/bind/zones.hugdontmug.com I get this:

dns_master_load: /etc/bind/zones.hugdontmug.com:1: syntax errordns_master_load: /etc/bind/zones.hugdontmug.com:1: isc_lex_gettoken() failed: unbalanced quotesdns_master_load: /etc/bind/zones.hugdontmug.com:1: unbalanced quotes/etc/bind/zones.hugdontmug.com:2: unknown RR type 'type'/etc/bind/zones.hugdontmug.com:3: unknown RR type 'file'/etc/bind/zones.hugdontmug.com:4: unknown RR type 'allow-update'dns_master_load: /etc/bind/zones.hugdontmug.com:6: unexpected end of linedns_master_load: /etc/bind/zones.hugdontmug.com:5: unexpected end of inputzone hugdontmug.com/IN: loading from master file /etc/bind/zones.hugdontmug.com failed: syntax error

The files that are being used look like this:named.conf

// This is the primary configuration file for the BIND DNS server named.//// Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file.//// If you are just adding zones, please do that in /etc/bind/named.conf.localinclude "/etc/bind/named.conf.options";// prime the server with knowledge of the root serverszone "." {	type hint;	file "/etc/bind/db.root";};// be authoritative for the localhost forward and reverse zones, and for// broadcast zones as per RFC 1912zone "localhost" {	type master;	file "/etc/bind/db.local";};zone "127.in-addr.arpa" {	type master;	file "/etc/bind/db.127";};zone "0.in-addr.arpa" {	type master;	file "/etc/bind/db.0";};zone "255.in-addr.arpa" {	type master;	file "/etc/bind/db.255";};include "/etc/bind/named.conf.local";

named.conf.options

options {	directory "/var/cache/bind";	// If there is a firewall between you and nameservers you want	// to talk to, you may need to fix the firewall to allow multiple	// ports to talk.  See [url="http://www.kb.cert.org/vuls/id/800113"]http://www.kb.cert.org/vuls/id/800113[/url]	// If your ISP provided one or more IP addresses for stable 	// nameservers, you probably want to use them as forwarders.  	// Uncomment the following block, and insert the addresses replacing 	// the all-0's placeholder.	forwarders {		167.142.225.3;		167.142.225.5;			};	auth-nxdomain no;    # conform to RFC1035	listen-on-v6 { any; };};

named.conf.local

//// Do any local configuration here//// Consider adding the 1918 zones here, if they are not used in your// organization//include "/etc/bind/zones.rfc1918";include "/etc/bind/zones.hugdontmug.com";

zones.hugdontmug.com

zone "hugdontmug.com" IN {       type master;       file "/var/named/hugdontmug.com";       allow-update { none; };};

hugdontmug.com

$TTL    60$ORIGIN hugdontmug.com.@               1D IN SOA       @ root (                                       200904181       ; serial(AAAALLZZS)                                       3H              ; refresh                                       15M             ; retry                                       1D              ; expiry                                       1H              ; minimum                               );                                A               209.152.71.92                                NS              ns.hugdontmug.com.                                MX              10 mail.hugdontmug.com.;ns                              A               209.152.71.92www                             A               209.152.71.92mail                            A               209.152.71.92webmail                         A               209.152.71.92wiki                            A               209.152.71.92start                           CNAME           ghs.google.com.docs                            CNAME           ghs.google.com.calendar                        CNAME           ghs.google.com.

Now, I used a tutorial so if something is wrong or unnecessary, let me know. If anyone has a better tutorial or some kind of documentation that will help me out, please let me know. Thanks.

Link to comment
Share on other sites

I haven't set up a DNS server, so I'm not an authority by any means, but it's probably not correct to have this in named.conf.options:include "/etc/bind/named.conf.options";I don't understand why it's saying there are mismatched quotes in the zones.hugdontmug.com file, I don't see any obvious problems there. Should things like "type" or "master" be quoted?

Link to comment
Share on other sites

My bad. That wasn't the actual contents of named.conf.options. The real contents must not have copied and I pasted named.conf's contents and didn't catch it. I was really tired lol.

Link to comment
Share on other sites

The original problem has been fixed. Well, actually apparently the checkzone function shouldn't be used on the configuration file, but the zone file itself. Using it on that, it passed. But that doesn't explain to me why the domain name won't work when I try to go to my site using it. If anyone has any ideas, let me know. The browser just keeps saying the address wasn't found.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...