l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Raspbian DNS Setup Issues

Tue Jul 28, 2015 2:38 pm

I am not sure what I need to supply but I really could use some assistance. Just cannot seem to get it to work at all.
I do not care to have the DNS server public but more for internal networking at the moment. I have comcast and the server is directly to the modem (10.0.0.1) with a static IP which is 10.0.0.6

I created a zone, local and reverse inside /etc/bind
When I try to execute:

Code: Select all
#/etc/init.d/bind9 start



I get a failure.

When I check syslog I get:

Code: Select all
#/var/log/syslog -

somwhere in the log it would say.

Opening /[my sudo username]
Failed /[my sudo username] no such file or directory



my resolv.conf in the etc folder keeps reconfiguring itself everytime I restart networking

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Wed Jul 29, 2015 12:26 am

Code: Select all

cat /var/log/syslog
Jul 29 00:25:05 raspberrypi named[5205]: starting BIND 9.8.4-rpz2+rl005.12-P1 -u bind -c [My current username]
Jul 29 00:25:05 raspberrypi named[5205]: 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-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2'
Jul 29 00:25:05 raspberrypi named[5205]: ----------------------------------------------------
Jul 29 00:25:05 raspberrypi named[5205]: BIND 9 is maintained by Internet Systems Consortium,
Jul 29 00:25:05 raspberrypi named[5205]: Inc. (ISC), a non-profit 501(c)(3) public-benefit 
Jul 29 00:25:05 raspberrypi named[5205]: corporation.  Support and training for BIND 9 are 
Jul 29 00:25:05 raspberrypi named[5205]: available at https://www.isc.org/support
Jul 29 00:25:05 raspberrypi named[5205]: ----------------------------------------------------
Jul 29 00:25:05 raspberrypi named[5205]: adjusted limit on open files from 4096 to 1048576
Jul 29 00:25:05 raspberrypi named[5205]: found 4 CPUs, using 4 worker threads
Jul 29 00:25:05 raspberrypi named[5205]: using up to 4096 sockets
Jul 29 00:25:05 raspberrypi named[5205]: loading configuration from ' '/[my username]''
Jul 29 00:25:05 raspberrypi named[5205]: open:  '/[my username]': file not found
Jul 29 00:25:05 raspberrypi named[5205]: loading configuration: file not found
Jul 29 00:25:05 raspberrypi named[5205]: exiting (due to fatal error)

Last edited by l3l00 on Wed Jul 29, 2015 2:33 am, edited 1 time in total.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Wed Jul 29, 2015 12:28 am

---
Last edited by l3l00 on Wed Jul 29, 2015 12:36 am, edited 1 time in total.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Wed Jul 29, 2015 12:29 am

Code: Select all

cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";

// Did not call for the one below
// include "/etc/bind/named.conf.default-zones";


l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Wed Jul 29, 2015 2:30 am

I suppose my first route for debugging is trying to figure out why it is attempting to pull from root the current username. Dmesg pretty much preaches the same message as syslog.


Jul 29 00:25:05 raspberrypi named[5205]: starting BIND 9.8.4-rpz2+rl005.12-P1 -u bind -c [My current username]

Jul 29 00:25:05 raspberrypi named[5205]: open: '/[my username]': file not found

mikey32094
Posts: 38
Joined: Sat Jul 25, 2015 10:07 am

Re: Raspbian DNS Setup Issues

Wed Jul 29, 2015 4:45 am

If you don't mind a small additional service on your machine, webmin makes these kinds of things extremely easy. I setup my own new PI to be a slave-dns off my main server in like 5 minutes.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Wed Jul 29, 2015 3:53 pm

Ya, I have looked into webmin yeasts ago but for the purposes of what I am accomplishing, webmin is unacceptable. It must be utilizing bind9.

Now the syslog does have this obscure error message, another issue is the resolv.conf file that is located in the etcy folder. The top has a comment that it is generated by resolvconf.

Which is one reason why my changes get overwritten Every time when I restart the networking or use

Code: Select all

resolvconf -u
So changing -f cleaned the file, but I need to figure it how the command adds domains and nameservers.

User avatar
DougieLawson
Posts: 37686
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian DNS Setup Issues

Wed Jul 29, 2015 7:46 pm

You can add lines in /etc/network/interfaces to define the nameservers you'd like to use. The resolvconf program uses those to write /etc/resolv.conf when the interface comes up active.

Code: Select all

 dns-nameservers 192.168.1.254 8.8.8.8
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 1:56 am

Code: Select all

auto lo
iface lo inet loopback

#auto eth0
allow-hotplug eth0
iface eth0 inet static
        address 10.0.0.6
        netmask 255.255.255.0
        gateway 10.0.0.1
dns-search DomainNameIChose.local
dns-domain DomainNameIChose.local
dns-nameserver 10.0.0.6 4.2.2.1 10.0.2.1

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 1:59 am

I removed 10.0.2.1 then did:

Code: Select all

# /etc/init.d/networking restart
# /etc/init.d/bind9 start
I got no error!!!!!!!

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 2:07 am

To test I would imagine I just ping the zone I set. I was curious . . . the zone, here is where you tell what ip addr to use and this I am guess workstations as well, like workstations that can access the dns zone? Am I correct on this?

Although the DNS server is running statically on 10.0.0.6, I do have a node cluster of 192.168.1.0/. . .
How would I be able to get that node to ping the DNS Server?

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 4:00 am

Turns out network connectivity does not work now. . . But BIND is running

User avatar
DougieLawson
Posts: 37686
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 4:04 pm

l3l00 wrote:Turns out network connectivity does not work now. . . But BIND is running
Is it hardware or software that's breaking it?

Do you get green lights on each end of the cable?
What do the
ifconfig -a
ip route
ping -c3 8.8.8.8

commands give you?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 10:45 pm

Hey thank you for helping me out.

Code: Select all

$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr ...
          inet addr:10.0.0.6  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6631 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2627 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7652898 (7.2 MiB)  TX bytes:316102 (308.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1440 (1.4 KiB)  TX bytes:1440 (1.4 KiB)

Code: Select all

$ ip route
default via 10.0.0.1 dev eth0 
10.0.0.0/24 dev eth0  proto kernel  scope link  src 10.0.0.6 

Code: Select all

 $ ping -c 6 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5008ms

User avatar
DougieLawson
Posts: 37686
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 11:55 pm

What does
ping -c3 10.0.0.1
give you?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Thu Jul 30, 2015 11:58 pm

Code: Select all

$ ping -c 3 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_req=1 ttl=64 time=0.968 ms
64 bytes from 10.0.0.1: icmp_req=2 ttl=64 time=1.20 ms
64 bytes from 10.0.0.1: icmp_req=3 ttl=64 time=0.836 ms

--- 10.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.836/1.001/1.201/0.155 ms


User avatar
DougieLawson
Posts: 37686
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian DNS Setup Issues

Fri Jul 31, 2015 12:00 am

Who owns that machine at 10.0.0.1 and why won't it route your traffic to the public internet?

Pick up the phone, call the folks who run your network.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Fri Jul 31, 2015 12:02 am

10.0.0.1 is the default gateway.

User avatar
DougieLawson
Posts: 37686
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian DNS Setup Issues

Fri Jul 31, 2015 12:08 am

l3l00 wrote:10.0.0.1 is the default gateway.
Yes, but it's working as a blackhole right now. So you need to talk to the folks who own it. Or if it is your equipment then you need to reboot it or reconfigure it because it clearly doesn't like IP traffic that originates from MAC address B8:27:EB:xx:yy:zz

MAC address filtering is insane, it's the invention of Mordac the Preventer of Information Technology.
http://computerguys.sg/2014/04/do-you-h ... epartment/
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Fri Jul 31, 2015 12:18 am

I own the modem, I do have internet connectivity. I just now was able to get the dns server to connect with the outside world. I ran apt-get update and it is grabbing the info just fine.

The problem now is that my workstation 192.168.1.6 cannot contact the nameserver.
if I ping 10.0.0.6 (Client Side, red hat OS if that helps) it will find it
when I ping theDomainIChose.local it will find it (server side)
however I have it set to: theDomainIChose.org
When I ping that it cannot find it (Server side)

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Fri Jul 31, 2015 12:49 am

This is what I get on the client side:

Code: Select all


$ nslookup node2.domainIChose.org
Server:		75.75.75.75
Address:	75.75.75.75#53

** server can't find node2.domainIChose.org: NXDOMAIN

[[email protected]]$ nslookup node2.domainIChose.org
Server:		75.75.75.75
Address:	75.75.75.75#53

** server can't find node2.domainIChose.org: NXDOMAIN



User avatar
DougieLawson
Posts: 37686
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian DNS Setup Issues

Fri Jul 31, 2015 11:07 am

Sorry I've no idea what you're trying to achieve.
If you won't reveal your domain names then nobody outside from your network can help you.

Take a look at
dig +trace A domainname.example.com
that should show exactly where your DNS query is being recursed through the resolver hierarchy.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

mikey32094
Posts: 38
Joined: Sat Jul 25, 2015 10:07 am

Re: Raspbian DNS Setup Issues

Sat Aug 01, 2015 8:17 pm

My addition 2 cents ... Webmin does work with Bind9. It's on mine right now.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Raspbian DNS Setup Issues

Sun Aug 02, 2015 1:06 am

l3l00 wrote:I own the modem, I do have internet connectivity. I just now was able to get the dns server to connect with the outside world. I ran apt-get update and it is grabbing the info just fine.

The problem now is that my workstation 192.168.1.6 cannot contact the nameserver.
if I ping 10.0.0.6 (Client Side, red hat OS if that helps) it will find it
when I ping theDomainIChose.local it will find it (server side)
however I have it set to: theDomainIChose.org
When I ping that it cannot find it (Server side)
To make life simple I'd choose either 192.168.x.x or 10.x.x.x, mixing and matching doesn't always work (even if your router supports it like mine does, it doesn't always play nice)

l3l00
Posts: 18
Joined: Tue Jul 28, 2015 2:36 pm

Re: Raspbian DNS Setup Issues

Mon Aug 03, 2015 2:50 am

asandford: Hey thank you for the input. Ya I spoke with one of my IT buddies and he pretty much said the same thing is to put it on the same network as the workstations that I want call it by its nameserver. There was an error I noticed I was doing in the named.conf file. It was with the rev address portion of setting up a DNS server. As far as I know, the rev-addr is the point where you feed it what Zone to look up. Well I had it calling a zone that I made awhile back but did not touch.

So, as far as I know I have the zone set up properly. However, it leaves the question that I am not setting up the DNS properly on my workstation I would like for it to find.

Return to “Networking and servers”