LinuxQuestions.org
Review your favorite Linux distribution.
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 07-06-2005, 11:47 AM   #1
Dooberdoink
LQ Newbie
 
Registered: Mar 2005
Distribution: Mandrake 10.0
Posts: 8

Rep: Reputation: 0
sockets blocked on local network, can't figure out why


Hello. My problem is that I'm trying to set up a BIND 9 server on my network, and I can't even get through the initial steps without messages like this:

[root@localhost patrick]# service iptables stop
[ OK ]
Resetting built-in chains to the default ACCEPT policy


[root@localhost patrick]# named

[root@localhost patrick]# tail /var/log/messages

Jul 6 12:40:07 localhost named[6275]: starting BIND 9.3.1

Jul 6 12:40:07 localhost named[6275]: loading configuration from '/etc/named.conf'

Jul 6 12:40:07 localhost named[6275]: listening on IPv4 interface lo, 127.0.0.1#53

Jul 6 12:40:07 localhost named[6275]: binding TCP socket: address in use

Jul 6 12:40:07 localhost named[6275]: listening on IPv4 interface ra0, 192.168.1.100#53

Jul 6 12:40:07 localhost named[6275]: binding TCP socket: address in use

Jul 6 12:40:07 localhost named[6275]: /etc/named.conf:7: couldn't add command channel 127.0.0.1#953: address in use

Jul 6 12:40:07 localhost named[6275]: /etc/pz/127.0.0:8: unknown RR type 'troop80.dyndns.org.'

Jul 6 12:40:07 localhost named[6275]: zone 0.0.127.in-addr.arpa/IN: loading master file /etc/pz/127.0.0: unknown class/type

Jul 6 12:40:07 localhost named[6275]: running

Earlier, I tried using putty to reach local host. The reply was that the network was unreachable.

How do do I find out what is tying up my sockets, and how do I fix them?
 
Old 07-06-2005, 02:39 PM   #2
danglingpointer
LQ Newbie
 
Registered: Jan 2005
Location: USA
Distribution: Slackware 10
Posts: 17

Rep: Reputation: 0
try this as root:

netstat -l -a -p -e

That will provide you with all of the programs listening on all of the sockets. If there aren't any programs listening on your loopback address, you may have some dangling sockets that were improperly closed. You can try and bounce the system to bring those back. Also check your syslogs for socket errors.

Let me know if this helps.

- Tim
 
Old 07-06-2005, 04:17 PM   #3
Dooberdoink
LQ Newbie
 
Registered: Mar 2005
Distribution: Mandrake 10.0
Posts: 8

Original Poster
Rep: Reputation: 0
hmmm...

Funny, I began running bind as chroot and everything seems to be working better now.
Now the output reads:

root@localhost patrick]# tail /var/log/messages

Jul 6 16:52:23 localhost named[4819]: starting BIND 9.3.1

Jul 6 16:52:23 localhost named[4819]: loading configuration from '/etc/named.conf'

Jul 6 16:52:23 localhost named[4819]: listening on IPv4 interface lo, 127.0.0.1#53

Jul 6 16:52:23 localhost named[4819]: binding TCP socket: address in use

Jul 6 16:52:23 localhost named[4819]: listening on IPv4 interface ra0, 192.168.1.100#53

Jul 6 16:52:23 localhost named[4819]: binding TCP socket: address in use

Jul 6 16:52:23 localhost named[4819]: /etc/named.conf:7: couldn't add command channel 127.0.0.1#953: address in use

Jul 6 16:52:23 localhost named[4819]: zone 0.0.127.in-addr.arpa/IN: loaded serial 2

Jul 6 16:52:23 localhost named[4819]: zone troop80.dyndns.org/IN: loaded serial 1120677909

Jul 6 16:52:23 localhost named[4819]: running

Now, I'm able to load two serials. Would I still need to bind into the sockets?
I have a feeling that this question is pretty ignorant...

-thanks for your help
I would like to think that I have everything working now. But I have this funny feeling that when I test it out some more in the morning, I'll have to do more than just a netstat, as it mentions nothing about localhost.
 
Old 07-06-2005, 09:30 PM   #4
danglingpointer
LQ Newbie
 
Registered: Jan 2005
Location: USA
Distribution: Slackware 10
Posts: 17

Rep: Reputation: 0
Very strange. Did you install BIND yourself or did it come with the distro? If you installed it yourself, did you do the 'make install' as root? I am not terribly sure why you would need to chroot BIND other than for your own personal security reasons. Where did you set the root to after you chroot'ed it? It seems that your 'named' is running, did you try testing it out to see if it is receiving requests?

Hmm. I just had a thought. Instead of calling 'named' directly, call 'rndc start' instead. I think that automatically starts 'named' as a root user, though you may have to be logged in as root to use 'rndc'. Forgive me if I seem vague, it has been a while since I set up my DNS server. Let me know if this works.

- Tim
 
Old 07-07-2005, 09:17 AM   #5
Dooberdoink
LQ Newbie
 
Registered: Mar 2005
Distribution: Mandrake 10.0
Posts: 8

Original Poster
Rep: Reputation: 0
I installed bind myself, and I did the make install as root. Maybe chrooting it was just a coinsedence, for it seems as if I got some sort of a request. Chroot is being run from /chroot, and whenever I run rndc start I always get a message that the connection was refused.

If it makes any difference, I have configured /etc/hosts.allow and /etc/hosts.deny as follows:

#
# hosts.deny

ALL:ALL

# hosts.allow

ALL:127.0.0.1,192.168.1.

The results of dig are:

; <<>> DiG 9.3.1 <<>> troop80.dyndns.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24903
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 5

;; QUESTION SECTION:
;troop80.dyndns.org. IN A

;; ANSWER SECTION:
troop80.dyndns.org. 14400 IN A 24.131.216.68

;; AUTHORITY SECTION:
dyndns.org. 86400 IN NS ns2.dyndns.org.
dyndns.org. 86400 IN NS ns3.dyndns.org.
dyndns.org. 86400 IN NS ns4.dyndns.org.
dyndns.org. 86400 IN NS ns5.dyndns.org.
dyndns.org. 86400 IN NS ns1.dyndns.org.

;; ADDITIONAL SECTION:
ns1.dyndns.org. 86400 IN A 63.208.196.90
ns2.dyndns.org. 86400 IN A 209.69.32.137
ns3.dyndns.org. 86400 IN A 63.209.15.210
ns4.dyndns.org. 86400 IN A 213.155.150.205
ns5.dyndns.org. 86400 IN A 63.208.196.91

;; Query time: 50 msec
;; SERVER: 63.240.76.4#53(63.240.76.4)
;; WHEN: Thu Jul 7 09:59:57 2005
;; MSG SIZE rcvd: 222

Thanks for all of your help. I feel like I'm getting closer to solving my problem.
 
Old 07-07-2005, 01:16 PM   #6
danglingpointer
LQ Newbie
 
Registered: Jan 2005
Location: USA
Distribution: Slackware 10
Posts: 17

Rep: Reputation: 0
Aaaaaaah. I now understand the problem. I, too, had the same problem with rndc when I set up mine originally. Check the file permissions of rndc.conf, named.conf, and rndc.key (if it exists). They should all be +rwx for owner and owner should be root.

If that does not solve the problem, you need to ensure that your key matches what is in rndc.conf and what is in named.conf. You can simplify this by using 'import "rndc.key"' (make sure you have the double quotes around the file name) line inside of the named.conf and rndc.conf files.

Thanks for the memory jog!

- Tim
 
  


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
Can't figure out how to be listening for data all the time with C sockets Eddie101 Programming 2 03-25-2005 10:34 PM
Issues with UNIX Local Sockets permission ghoughto Programming 2 12-13-2004 06:38 PM
Find Blocked Ports on Network artielnx Linux - Newbie 2 09-30-2004 03:01 PM
network blocked on mdk 10 funky79 Linux - Networking 2 07-15-2004 06:18 AM
Network card interrupt line blocked ?? chinwah Linux - Networking 0 04-17-2002 01:19 AM

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

All times are GMT -5. The time now is 05:38 AM.

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