DNS on Ubuntu

Additional operating system/hardware discussion (Windows, Linux, *BSD and others)
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

DNS on Ubuntu

Unread postby Nuke » Fri Feb 17, 2012 7:01 am

So I tried booting up BIND9 on my Ubuntu to start a DNS server on there so that I could get a domain name up and running.

It simply said "[fail]" in red in Terminal on my Ubuntu.

So...any advice, Nekochan?

User avatar
zmttoxics
Posts: 893
Joined: Mon Aug 31, 2009 9:11 am

Re: DNS on Ubuntu

Unread postby zmttoxics » Fri Feb 17, 2012 7:12 am

Does ubuntu have `named-checkconf` and `named-checkzone` ? I would run through your configs and make sure they pass.
Stuff.

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: DNS on Ubuntu

Unread postby Nuke » Fri Feb 17, 2012 8:30 am

I'll check those when I get home. Thanks.

rooprob
Posts: 52
Joined: Wed Sep 01, 2010 7:20 am

Re: DNS on Ubuntu

Unread postby rooprob » Fri Feb 17, 2012 1:15 pm

Soundslike you have made a config typo but there should be something in one of the error logs. /var/log/messages usually, or /var/run/named.

Frankly, though, consider looking at djbdns instead of bind.
:O2: r12 400 mapleleaf
New Zealand

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: DNS on Ubuntu

Unread postby Nuke » Fri Feb 17, 2012 3:07 pm

/var/log/messages does not exist. /var/run/named is empty.

I'll look at /etc/bind/, and consider switching to DBNDNS, which is DJBDNS patched for IPv6 support.

User avatar
smj
Posts: 1409
Joined: Mon Nov 12, 2007 8:54 pm
Location: Berkeley, CA, USA, NA, Earth, Sol
Contact:

Re: DNS on Ubuntu

Unread postby smj » Fri Feb 17, 2012 6:23 pm

Nuke wrote:/var/log/messages does not exist. /var/run/named is empty.

Dunno about Ubuntu, but BIND9 on FreeBSD is rock solid. By all means look at other options, but not without hearing a positive vote for BIND. Not to mention active support, IPv6 and DNSSEC support, ubiquitous use across the Internet, etc etc.
Then? :IRIS3130: ... Now? :O3x02L: :A3504L:- :A3502L: :1600SW:+MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: ... Other: DEC :BA213: :BA123: Sun, DG AViiON, NeXT :Cube:

User avatar
D-EJ915
Posts: 818
Joined: Mon Jul 30, 2007 10:07 pm
Location: Virginia Beach, USA
Contact:

Re: DNS on Ubuntu

Unread postby D-EJ915 » Fri Feb 17, 2012 6:58 pm

Check the syslog file, I'm pretty sure that's where ubuntu spits out bind related info.
:Indy: :rx2600: :Indigo2: :Octane2: :hpserv: :hpserv: :O2: :Indigo2: :Indy: :Indy: system info on my website

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: DNS on Ubuntu

Unread postby Nuke » Fri Feb 17, 2012 8:47 pm

@SMJ: Yeah, when I get an actual server up and running, I'm probably using FreeBSD.

SAQ
Posts: 5758
Joined: Wed Jul 19, 2006 8:37 am
Location: Renton, WA

Re: DNS on Ubuntu

Unread postby SAQ » Fri Feb 17, 2012 9:46 pm

I know it's rather lazy of me, but I will often just try to run a failing binary from the command line. Many times the error gets written to stdio and you see it on the console rather than having to find the right log.
Damn the torpedoes, full speed ahead!

There are those who say I'm a bit of a curmudgeon. To them I reply: "GET OFF MY LAWN!"

:Indigo: :Octane: :Indigo2: :Indigo2IMP: :Indy: :PI: :O3x0: :ChallengeL: :O2000R: (single-CM)

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: DNS on Ubuntu

Unread postby Nuke » Fri Feb 17, 2012 10:57 pm

Oops, forgot to reply to D-E.

Syslog as in /sys/log/? It doesn't exist.

@SAQ: It just says Fail.

EDIT: It seems that by removing sudo from my command, it gives more information. CHMOD is needed to do this.

* Starting domain name service... bind9 chmod: changing permissions of `/var/run/named': Operation not permitted

User avatar
smj
Posts: 1409
Joined: Mon Nov 12, 2007 8:54 pm
Location: Berkeley, CA, USA, NA, Earth, Sol
Contact:

Re: DNS on Ubuntu

Unread postby smj » Sat Feb 18, 2012 12:10 am

Nuke wrote:Syslog as in /sys/log/? It doesn't exist.
On some systems you'd find syslog messages are being recorded in /var/log/syslog, another file in /var/log, or even under /var/adm. But rather than guessing, you should check the file /etc/syslog.conf or /etc/rsyslog.conf and look for a line like this:

Code: Select all

*.info;mail.none;authpriv.none;cron.none                /var/log/messages
That's the file we're talking about. It might have something, it might not.

EDIT: It seems that by removing sudo from my command, it gives more information.
It's complaining because your regular-user account doesn't have permission to run chmod on /var/run/named. Which is as it should be.

To do what SAQ suggests you'd need to do something like "sudo bash" to have a shell running as root, then invoke named. But before you try that, just try running "man named-checkconf" and "man named-checkzone" -- read those pages to learn how you can validate your named configuration, and the data you're feeding it.
Then? :IRIS3130: ... Now? :O3x02L: :A3504L:- :A3502L: :1600SW:+MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: ... Other: DEC :BA213: :BA123: Sun, DG AViiON, NeXT :Cube:

User avatar
smj
Posts: 1409
Joined: Mon Nov 12, 2007 8:54 pm
Location: Berkeley, CA, USA, NA, Earth, Sol
Contact:

Re: DNS on Ubuntu

Unread postby smj » Sat Feb 18, 2012 12:17 am

Nuke wrote:So I tried booting up BIND9 on my Ubuntu to start a DNS server on there so that I could get a domain name up and running.

It simply said "[fail]" in red in Terminal on my Ubuntu.

So...any advice, Nekochan?

Okay wait a minute - you've never run named before on this machine? You didn't setup a config file? If you haven't configured it, you shouldn't expect it to run correctly - it isn't something you normally need on a workstation/desktop, and many servers don't even run it locally.

So let's back up a step - why did you decide to try running named in the first place?
Then? :IRIS3130: ... Now? :O3x02L: :A3504L:- :A3502L: :1600SW:+MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: ... Other: DEC :BA213: :BA123: Sun, DG AViiON, NeXT :Cube:

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: DNS on Ubuntu

Unread postby Nuke » Sat Feb 18, 2012 12:45 am

Alright, SMJ. I found syslog under /var/log/. Thanks.

I did a bit of configuration based on the documentation for Ubuntu server. I tried it before when this machine was a Ubuntu server, about May 2011? But I had to do a clean install due to a thing.

Now I'll answer why I'm running this. I'm trying to set up an internal host for my extremely-far-from-launching company's site.

EDIT: GADMIN-BIND says upon activation:

"18-Feb-2012 09:55:59.061 starting BIND 9.7.3 -fg -u bind -t /var/named -c /etc/named.conf
18-Feb-2012 09:55:59.061 built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
18-Feb-2012 09:55:59.061 adjusted limit on open files from 4096 to 1048576
18-Feb-2012 09:55:59.061 found 4 CPUs, using 4 worker threads
18-Feb-2012 09:55:59.061 using up to 4096 sockets
18-Feb-2012 09:55:59.064 loading configuration from '/etc/named.conf'
18-Feb-2012 09:55:59.064 none:0: open: /etc/named.conf: permission denied
18-Feb-2012 09:55:59.064 loading configuration: permission denied
18-Feb-2012 09:55:59.064 exiting (due to fatal error)"

User avatar
smj
Posts: 1409
Joined: Mon Nov 12, 2007 8:54 pm
Location: Berkeley, CA, USA, NA, Earth, Sol
Contact:

Re: DNS on Ubuntu

Unread postby smj » Sat Feb 18, 2012 3:11 am

Fair enough. There are plenty of guides to configuring BIND on the 'Net, and you mention you've been reading the Ubuntu docs. The Linux Documentation Project has a bunch of stuff as well.

I'd also recommend Cricket Liu's O'Reilly book, DNS and BIND. The 5th edition has been out for a bunch of years so you ought to be able to pick up a used copy cheap if you go that route.
Then? :IRIS3130: ... Now? :O3x02L: :A3504L:- :A3502L: :1600SW:+MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: ... Other: DEC :BA213: :BA123: Sun, DG AViiON, NeXT :Cube:

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: DNS on Ubuntu

Unread postby Nuke » Sat Feb 18, 2012 3:47 am

I couldn't really fix the problem based on Ubuntu documentation. Thanks for the advice, though. :)


Return to “Miscellaneous Operating Systems/Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests