LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-04-2009, 08:03 AM   #1
krtin
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Rep: Reputation: 0
Problem Setting up DNS server


os: ubuntu 9.1 server(gui added)
DNS Software: Bind9
Link To Config Files: Contains:named.conf, named.conf.local,
named.conf.options, zone files

Problem:
On entering "dig 1.168.192.in-addr.arpa. AXFR" in terminal I get this error Connection to 192.168.1.1#53(192.168.1.1) for 1.168.192.in-addr.arpa. failed: connection refused.
but on entering "ping 192.168.1.1" which is my nameserver I get no errors and i get the reply 64 bytes from 192.168.1.1: icmp_seq=147 ttl=64 time=1.71 ms

I don't know whether server is working or not since I have not yet registered the domain
I want to know whether the current configuration will work when I register a domain
Thanks in advance

------------------------------------------------------------------------

For those of you who don't want to download the files
1.Zone setup
$TTL 604800
@ IN SOA ns1.mydomain.in. admin.mydomain.in. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL

@ IN NS ns1.mydomain.in.
@ IN MX 10 mail.mydomain.in.

www IN A 192.168.1.2-->LAN IP of my comp
mail IN A 192.168.1.2
ns1 IN A 192.168.1.2

2.Reverse Zone Setup
$TTL 604800
@ IN SOA ns1.mydomain.in. admin.mydomain.in. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL

@ IN NS ns.
2 IN PTR ns.mydomain.in

3.named.conf

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

4.named.conf.local
zone "allguides.in" {
type master;
file "/etc/bind/zones/allguides.in.db";
};
zone "1.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/zones/rev.1.168.192.in-addr.arpa";
};

5.named.conf.options
options {
directory "/var/cache/bind";
forwarders {
192.168.1.1;-------->nameserver (listed in resolv.conf)
};

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

Last edited by krtin; 12-04-2009 at 08:06 AM.
 
Old 12-04-2009, 08:39 AM   #2
tinuzz
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
Since the error is 'connection refused', there are two options:
- Your nameserver is not listening on TCP port 53
- You have TCP port 53 blocked in your firewall

For AXFR you must have TCP port 53 open.

What happens if you telnet to localhost 53 on the box itself? If you get a connection, then it's probably your firewall.

Best regards,
Martijn.
 
Old 12-04-2009, 12:18 PM   #3
krtin
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
I have forwarded port 53 in my router config page

Quote:
Originally Posted by tinuzz View Post
What happens if you telnet to localhost 53 on the box itself?
Can you tell me how to do this?
 
Old 12-06-2009, 08:25 AM   #4
tinuzz
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
Just log in to the DNS server and type 'telnet localhost 53'.
 
Old 12-07-2009, 09:19 AM   #5
thePiet
LQ Newbie
 
Registered: Dec 2009
Posts: 25

Rep: Reputation: 15
Quote:
Originally Posted by tinuzz View Post
- Your nameserver is not listening on TCP port 53
Is it even running?
 
Old 12-08-2009, 09:49 PM   #6
krtin
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tinuzz View Post
Just log in to the DNS server and type 'telnet localhost 53'.
Thanks for your reply

It gives me the below

telnet localhost 53
Trying ::1...
Connected to localhost.
 
Old 12-08-2009, 09:54 PM   #7
krtin
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by thePiet View Post
Is it even running?
Bind is running but I don't know whether the configured it correctly or not as I have not used my WAN IP anywhere
If WAN IP is to be used somewhere please tell me where
 
Old 12-09-2009, 02:56 AM   #8
thePiet
LQ Newbie
 
Registered: Dec 2009
Posts: 25

Rep: Reputation: 15
Hmm I think you really need to update your knowledge about DNS / TCP/IP / BIND a bit more. If you don't understand what you are trying to configure and what's the goal of it, you really aren't going to succeed

I suggest you start over, by reading https://help.ubuntu.com/community/BIND9ServerHowto . That's a nice guide with some explanation how this stuff actually works, so you're really know what you're doing.

Good luck!
 
Old 12-10-2009, 03:07 AM   #9
tinuzz
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
I agree with thePiet. But from the conversation above, we can conlude that:
- the server is running and it's listening on localhost (tcp 53)
- the server is not reachable from the outside on 192.168.1.1

Things you can check:
- is the server listening on 192.168.1.1? log in to the box itself and telnet 192.168.1.1 53. If so, it's most probably the firewall blocking access from outside.
- the config posted above, does not specify any IP-adresses to listen on, so it SHOULD be listening on all IP adresses
- if you have 'lsof' (aptitude install lsof), you can check this:

lsof -nP | grep ^named | grep -E '(TCP|UDP)'

You should see something like this:

named 21243 bind 20u IPv4 70246475 TCP 127.0.0.1:53 (LISTEN)
named 21243 bind 21u IPv4 70246477 TCP 192.168.1.1:53 (LISTEN)
named 21243 bind 22u IPv4 70246478 TCP 127.0.0.1:953 (LISTEN)
named 21243 bind 23u IPv6 70246479 TCP [::1]:953 (LISTEN)
named 21243 bind 512u IPv4 70246474 UDP 127.0.0.1:53
named 21243 bind 513u IPv4 70246476 UDP 192.168.1.1:53

If 192.168.1.1 is there, your Bind is doing fine, and your connection problems are somewhere else, likely the firewall.

Now, please do some reading before asking any more questions.

Best regards,
Martijn.
 
Old 12-10-2009, 03:11 AM   #10
tinuzz
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
Oh, one more thing: using

forwarders {
192.168.1.1;
};

on the box itself is probably not a good idea, it doesn't make any sense. However, in absence of a 'forward' statement, it shouldn't hurt either.
 
  


Reply

Tags
bind, connection, dns, refused, server, setup


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
DNS server setting exx007 Linux - Newbie 1 08-07-2009 06:03 AM
Setting up a DNS server kraas Linux - Networking 3 04-25-2007 12:55 PM
Setting up BIND DNS server on Ubuntu server tanu221984 Linux - Software 2 04-13-2007 11:36 AM
Setting up a DNS server fastnet Linux - Networking 2 03-18-2004 05:03 AM
setting up dns server suprtiger Linux - Networking 2 10-24-2003 04:18 AM


All times are GMT -5. The time now is 11:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration