HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Problem setting up DNS - Kindly help (http://www.howtoforge.com/forums/showthread.php?t=25985)

skirao 12th August 2008 15:36

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

chipsafts 12th August 2008 19:21

Check your firewall settings.

Also, it might help to list the contents of /etc/init.d/bind9

skirao 13th August 2008 04:43

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.

skirao 13th August 2008 06:21

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 (Post 140658)
Check your firewall settings.

Also, it might help to list the contents of /etc/init.d/bind9


falko 13th August 2008 16:45

What are the outputs of
Code:

netstat -tap
and
Code:

ls -la /etc/bind/
?

skirao 14th August 2008 08:19

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.

chipsafts 14th August 2008 18:11

Quote:

Originally Posted by skirao (Post 140877)
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.

skirao 17th August 2008 08:48

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 (Post 140777)
What are the outputs of
Code:

netstat -tap
and
Code:

ls -la /etc/bind/
?


chipsafts 17th August 2008 23:54

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

skirao 25th August 2008 08:45

ok.. In named.conf file, i changed the zone entry from localhost to "ns1.student.local." restarted DNS and below is the result of nslookup. My configuration file is named.conf.local

nslookup
> ns1.student.local
Server: 10.10.10.4
Address: 10.10.10.4#53

Name: ns1.student.local
Address: 127.0.0.1

It is atleast resolving but the address is 127.0.0.1. which should be 10.10.10.4


Quote:

Originally Posted by chipsafts (Post 141259)
you don't have the "." right for
ns1.student.local
in your internal configuration file



All times are GMT +2. The time now is 03:34.

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