Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th August 2008, 15:36
skirao skirao is offline
Junior Member
 
Join Date: Aug 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Problem setting up DNS - Kindly help

Hello all,

I am trying to setup DNS server on Ubuntu 8.04 - AMD64 for my intranet from http://www.howtoforge.com/installing...rver-with-bind and below is the error and configuration. Studio is my server name and the IP address is 10.10.10.4. I am wondering if the file names and the entries are correct. I also have a wins server, how can i configure DNS to get the hostnames from the WINS server instead of adding them manually?

Contents of /etc/network/interfaces
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.10.10.4
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255

Contents of /etc/hosts

127.0.0.1 localhost.localdomain localhost

10.10.10.4 studio.abc.org studio
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Contents of /etc/default/bind9

OPTIONS="-u bind -t /var/lib/named"
# Set RESOLVCONF=no to not run resolvconf
RESOLVCONF=yes

Contents of /etc/bind/named.conf

zone "abc.org" {
type master;
file "/etc/bind/zones/abc.org.db";
};

zone "10.10.10.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.10.10.10.in-addr.arpa";
};

key "rndc-key" {
algorithm hmac-md5;
secret "9WNiBNj5fFyBWUxfR88nAQ==";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};

Contents of /etc/bind/named.conf.options. I don't have any other DNS servers in my network so i have commented all the entries except below.

forwarders {
123.123.123.123;
};

Contents of /etc/bind/zones/rev.10.10.10.in-addr.arpa

@ IN SOA studio.abc.org. root (
2006081401;
28800;
604800;
604800;
86400
)
IN NS studio.abc.org.
4 IN PTR abc.org

Contents of /etc/bind/zones/abc.org.db

abc.org. IN SOA studio.abc.org. root (

// Do not modify the following lines!
2006081401
28800
3600
604800
38400
)

// Replace the following line as necessary:
// ns1 = DNS Server name
// mta = mail server name
// example.com = domain name

abc.org. IN NS studio.abc.org.
//abc.org. IN MX 10 mta.abc.org. - Dont have a mail server

// Replace the IP address with the right IP addresses.
studio IN A 10.10.10.4


/etc/init.d/bind9 restart

root@studio:/etc/bind# /etc/init.d/bind9 restart
* Stopping domain name service... bind rndc: connect failed: 127.0.0.1#953: connection refused
[fail]
* Starting domain name service... bind usage: named [-4|-6] [-c conffile] [-d debuglevel] [-f|-g] [-n number_of_cpus]
[-p port] [-s] [-t chrootdir] [-u username]
[-m {usage|trace|record|size|mctx}]
named: extra command line arguments
[fail]


Kindly help

Last edited by skirao; 12th August 2008 at 15:41.
Reply With Quote
Sponsored Links
  #2  
Old 12th August 2008, 19:21
chipsafts chipsafts is offline
Senior Member
 
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
Default

Check your firewall settings.

Also, it might help to list the contents of /etc/init.d/bind9
Reply With Quote
  #3  
Old 13th August 2008, 04:43
skirao skirao is offline
Junior Member
 
Join Date: Aug 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't have any firewall configured in my network. I am setting up this DNS Server for my intranet. I have a squid proxy server running to access the internet and i have not configured firewall. I have a DHCP server running on another Linux Server that runs Squid and LTSP. Do you see any problem with this.
Reply With Quote
  #4  
Old 13th August 2008, 06:21
skirao skirao is offline
Junior Member
 
Join Date: Aug 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

contents of /etc/init.d/bind9

#!/bin/sh

### BEGIN INIT INFO
# Provides: bind9
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $network $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop bind9
# Description: bind9 is a Domain Name Server (DNS)
# which translates ip addresses to and from internet names
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

# for a chrooted server: "-u bind -t /var/lib/named"
# Don't modify this line, change or create /etc/default/bind9.
OPTIONS=""
RESOLVCONF=yes

test -f /etc/default/bind9 && . /etc/default/bind9

test -x /usr/sbin/rndc || exit 0

. /lib/lsb/init-functions
DISTRO=$(lsb_release -is 2>/dev/null || echo Debian)

check_network() {
if [ -z "$(/sbin/ifconfig)" ]; then
#log_action_msg "No networks configured."
return 1
fi
return 0
}

case "$1" in
start)
log_daemon_msg "Starting domain name service..." "bind"

modprobe capability >/dev/null 2>&1 || true

# dirs under /var/run can go away on reboots.
mkdir -p /var/run/bind/run
chmod 775 /var/run/bind/run
chown root:bind /var/run/bind/run >/dev/null 2>&1 || true

if [ ! -x /usr/sbin/named ]; then
log_action_msg "named binary missing - not starting"
log_end_msg 1
exit 1
fi

if ! check_network; then
log_end_msg 1
exit 1
fi

if start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/named \
--pidfile /var/run/bind/run/named.pid -- $OPTIONS; then
if [ "X$RESOLVCONF" != "Xno" ] && [ -x /sbin/resolvconf ] ; then
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.named
fi
log_end_msg 0
else
log_end_msg 1
fi
;;

stop)
log_daemon_msg "Stopping domain name service..." "bind"
if ! check_network; then
log_end_msg 1
exit 1
fi

if [ "X$RESOLVCONF" != "Xno" ] && [ -x /sbin/resolvconf ] ; then
/sbin/resolvconf -d lo.named
fi
/usr/sbin/rndc stop
log_end_msg $?
;;

reload|force-reload)
log_daemon_msg "Reloading domain name service..." "bind"
if ! check_network; then
log_end_msg 1
exit 1
fi

/usr/sbin/rndc reload >/dev/null
log_end_msg $?
;;

restart)
if ! check_network; then
exit 1
fi

$0 stop
sleep 2
$0 start
;;

*)
log_action_msg "Usage: /etc/init.d/bind9 {start|stop|reload|restart|forc
e-reload}"
exit 1
;;
esac

exit 0


Quote:
Originally Posted by chipsafts View Post
Check your firewall settings.

Also, it might help to list the contents of /etc/init.d/bind9
Reply With Quote
  #5  
Old 13th August 2008, 16:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

What are the outputs of
Code:
netstat -tap
and
Code:
ls -la /etc/bind/
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 14th August 2008, 08:19
skirao skirao is offline
Junior Member
 
Join Date: Aug 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

My server went down yesterday, i will reinstall the server, install DNS and surely get back. But before that, there's something really important i need decide on - the domain name for the intranet.

I have a domain name "abcd.org" registered on the internet, website managed by an ISP and its working fine. I am planning to have an Intranet site for the students for which i am configuring DNS, can i create a domain say for example, "students.abcd.org" which would be accessible only inside the office? Coz, all the machines have access to the internet so will there be a conflict? The students should be able to access the site using their web browser through the url, http://students.abcd.org!

Kindly help as this is very crucial.
Reply With Quote
  #7  
Old 14th August 2008, 18:11
chipsafts chipsafts is offline
Senior Member
 
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
Default

Quote:
Originally Posted by skirao View Post
Hi,
I have a domain name "abcd.org" registered on the internet, website managed by an ISP and its working fine. I am planning to have an Intranet site for the students for which i am configuring DNS, can i create a domain say for example, "students.abcd.org" which would be accessible only inside the office?
Yes, this is what external and internal DNS zones does.
List the url->ip only in the internal setup zone.
Reply With Quote
  #8  
Old 17th August 2008, 08:48
skirao skirao is offline
Junior Member
 
Join Date: Aug 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now, i am able to ping servername.domain.local. and it works. But, when i try to resolve it using nslookup, here's the reply.

Server: 10.10.10.4
Address: 10.10.10.4#53

** server can't find ns1.student.local.student.local: SERVFAIL

I have made the correct entries in /etc/resolv.conf
How can i resolve this?

Quote:
Originally Posted by falko View Post
What are the outputs of
Code:
netstat -tap
and
Code:
ls -la /etc/bind/
?
Reply With Quote
  #9  
Old 17th August 2008, 23:54
chipsafts chipsafts is offline
Senior Member
 
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
Default

you don't have the "." right for
ns1.student.local
in your internal configuration file
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid Proxy Caching on Linux obzerver Installation/Configuration 4 13th August 2008 19:51
DNS confusion and setting up subdomains on ISPConfig on Ubuntu 6.06 wctaelectronics Installation/Configuration 3 9th May 2008 00:25
Google Apps dayjahone General 19 29th March 2008 17:25
problem with DNS mauroca General 1 18th March 2008 09:59
FreeBSD DNS Problem -- any clue ? obzerver General 1 7th January 2008 13:57


All times are GMT +2. The time now is 02:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.