LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 02-14-2007, 04:02 AM   #1
noir911
Member
 
Registered: Apr 2004
Posts: 682

Rep: Reputation: Disabled
named not bind to IP


My named doesn't bind to my private IP and only binds to localhost.

Quote:
starting BIND 9.3.2-P1
command channel listening on 127.0.0.1#953
command channel listening on ::1#953
I already have the listen-on option in /var/named/etc/named.conf file pointed to my private IP.

Quote:

options {
listen-on { 192.168.25.5; };
allow-recursion { clients; };
};
If I do a "named -c /var/named/etc/named.conf" it gives error -

none:0: open: /var/named/etc/named.conf: file not found
loading configuration: file not found

All my files under /var/named are root:named.

My "/var/named/etc/named.conf" symlinks to /etc/named.conf. And if I start bind with "named" it starts on 127.0.0.1 by reading /etc/named.conf by default.

Even more odd is, if I do "named -c /etc/named.conf -g" it actually listens on my private IP along with localhost.

192.168.25.5.domain *.*

Last edited by noir911; 02-14-2007 at 04:11 AM.
 
Old 02-14-2007, 05:01 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just sounds like a broekn symlink. show us the output of "ls -l /var/named/etc/named.conf"
 
Old 02-14-2007, 05:14 AM   #3
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
# ls -l /var/named/etc/named.conf
-rw-r----- 1 root named 1740 Feb 14 15:49 /var/named/etc/named.conf

# ls -l /etc/named.conf
lrwxr-xr-x 1 root wheel 25 Feb 14 15:50 /etc/named.conf -> /var/named/etc/named.conf
 
Old 02-14-2007, 06:04 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
does the named daemon user have access to that directory as a whole? looks like a permissions issue then really. you might want to try slackening the permissions temporarily, make it all globally readable, including directories, to see if that makes it work.
 
Old 02-17-2007, 04:12 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
You can't give it the path to /var/named... because that will be the root once named is chrooted, so there is no /var/named/var/named/etc...

You must have modified something from the default installation of named on OpenBSD because it "just works" if you start it the way OpenBSD has provided (put named_flags="" in /etc/rc.conf.local, and if you have to restart it simply do /usr/sbin/named as root). I'm running 3 DNS servers on OpenBSD and none of them have a file or a symlink /etc/named.conf. What lead you to believe that it was necessary?

Edit: If you're using third-party documentation to setup services on OpenBSD, don't. OpenBSD has a FAQ on their website that explains how to do most common things, and if you look in /etc/rc.conf it shows a list of all the services that are built in by default. If something is configured to not run by default in /etc/rc.conf, you simply copy that configuration switch to /etc/rc.conf.local and turn it on. It will start automatically when the system boots.

You need to use the documentation from OpenBSD (such as the FAQ and their man pages) because a lot of the typical UNIX an GNU software that runs in OpenBSD has been modified for better security. The way you do something on OpenBSD is not necessarily the way you would do it on Linux or any other OS.

Last edited by chort; 02-17-2007 at 04:15 PM.
 
  


Reply



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
bind, named, and DNS cwwilson721 Slackware 1 12-07-2006 06:24 AM
bind and named Red Squirrel Linux - Software 3 04-25-2004 09:49 PM
BIND / named r3ekon Linux - Newbie 6 10-16-2003 05:33 PM
Bind / named 80s Linux - Networking 3 03-20-2003 07:47 AM
BIND / named issues Ratclaws Linux - Networking 2 03-08-2002 01:09 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 12:07 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