LinuxMCE Forums

General => Users => Topic started by: Matthew on January 14, 2008, 05:29:42 pm

Title: LMCE as DNS Server?
Post by: Matthew on January 14, 2008, 05:29:42 pm
How do I use LMCE as the nameserver for my LAN? Independent of using DynDNS so Internet hosts could find my LAN hosts by FQDNs published on the Internet, how can I just replace the /etc/hosts file on each of my LAN hosts with DNS management that's published only on my LAN?
Title: Re: LMCE as DNS Server?
Post by: colinjones on January 14, 2008, 08:48:21 pm
Wouldn't you just have to setup a DNS server on your core, and then edit the DHCP config file to point your MDs/devices at it rather than the Internet DNS system (or broadband router, which often forward these requests?) Don't know how you do that on Linux in terms of the detail, but functionally it is very simple. Isn't there a dhpcd.config file? That would be where you point the clients at your core. And DNS server is a standard function of all Unix-like OSs as far as I am aware... guessing dnsd? nsd? ypd? bind?
Title: Re: LMCE as DNS Server?
Post by: jgaffney on January 14, 2008, 11:00:18 pm
I'd suspect you could just install "bind" like on any other linux system.

I don't know enough about the MCE stuff to know if it will cause any problems but I would suspect it wouldn't.

I think this link will get it going for you
http://www.linode.com/wiki/index.php/Install_BIND9_in_Ubuntu_(Breezy)
Title: Re: LMCE as DNS Server?
Post by: Matthew on January 15, 2008, 12:15:05 am
LMCE already has named (but not bind) installed, which is a BIND 9 DNS server. I don't know what role it plays in LMCE, but probably there's a way to use either that facility already running (and perhaps configurable with an existing LMCE GUI), or to just add some configs for LAN administration. And probably add a GUI, which should also expose configuring DynDNS.

Anyone already know how this named subsystem works in LMCE?
Title: Re: LMCE as DNS Server?
Post by: hari on January 15, 2008, 12:19:43 am
LMCE already has named (but not bind) installed, which is a BIND 9 DNS server.
read that sentence again ;)

Quote
I don't know what role it plays in LMCE, but probably there's a way to use either that facility already running (and perhaps configurable with an existing LMCE GUI), or to just add some configs for LAN administration. And probably add a GUI, which should also expose configuring DynDNS.
there is no gui in lmce for that. Add your zone files to /etc/bind/named.conf.local

best regards,
Hari
Title: Re: LMCE as DNS Server?
Post by: Matthew on January 15, 2008, 12:37:25 am
LMCE already has named (but not bind) installed, which is a BIND 9 DNS server.
read that sentence again ;)

I read it twice when I posted it, to try to make sure I was clear that though others had just suggested installing bind, named was already installed, and named is a BIND server.


I don't know what role it plays in LMCE, but probably there's a way to use either that facility already running (and perhaps configurable with an existing LMCE GUI), or to just add some configs for LAN administration. And probably add a GUI, which should also expose configuring DynDNS.
there is no gui in lmce for that. Add your zone files to /etc/bind/named.conf.local

What does LMCE use named for by default? And is there any reason I shouldn't add at least a "zone file import" field to the LMCE Network settings form, if I get a chance?
Title: Re: LMCE as DNS Server?
Post by: hari on January 15, 2008, 12:51:27 am
LMCE already has named (but not bind) installed, which is a BIND 9 DNS server.
read that sentence again ;)

I read it twice when I posted it, to try to make sure I was clear that though others had just suggested installing bind, named was already installed, and named is a BIND server.
the named bind daemon is included in the package bind(9) (and thats installed per default)

Quote
there is no gui in lmce for that. Add your zone files to /etc/bind/named.conf.local

What does LMCE use named for by default?
as the named name suggests its used as a name server. What else?
your provider's name servers are written into the file /etc/bind/named.conf.forwarders (that gets included by named.conf.options) by the script "Network_DNS.sh". That greps the servers from "/etc/resolv.conf" at line 19.
Quote
And is there any reason I shouldn't add at least a "zone file import" field to the LMCE Network settings form, if I get a chance?
take your chance.
Title: Re: LMCE as DNS Server?
Post by: Matthew on February 04, 2008, 03:14:47 am
royw has posted     
HOWTO local authoritive dns with dhcp updates (http://forum.linuxmce.org/index.php?topic=4161.msg23820#msg23820).
Title: Re: LMCE as DNS Server?
Post by: royw on February 04, 2008, 06:06:21 am
Howdy,

I added the http://wiki.linuxmce.org/index.php/How_to_setup_Local_Authoritative_DNS (http://wiki.linuxmce.org/index.php/How_to_setup_Local_Authoritative_DNS) page to the wiki.  It should be close to what you want.  The changes have so far survived reboots so I don't think any of the LMCE scripts are affecting the changed files.


Have fun,
Roy
Title: Re: LMCE as DNS Server?
Post by: fibres on February 05, 2008, 01:20:14 am
Just noticed this post.

From what I know linuxmce uses named to proide dns resolutions for local machines. If you look at the network config on machines on the linuxmce network they have the core listed as their name server. Which means that these machine use the core for dns lookups.
From what I gather it uses dns forwarding and forwards all dns queries onto the dns servers on your isp to avoid excess network traffic.
This is known as a non recursive name server.
Basically the named on the core justs acts as a dns forwarder and passes the lookup to the isps name server istead of doing a full dns lookup itself.
So basically it will see if it has a zone file with info on the domain itself. ie if the domain is hosed on the local name server and if not it will pass it on/


Regards
Title: Re: LMCE as DNS Server?
Post by: tux-box1 on August 11, 2012, 08:21:10 pm
I know this is old, but I wanted to post my experience with this.
First I would like to make mention that their are some typing errors in the wiki.
For example at the part where you sate
Quote
You will be creating or editing the following config files in these new directories:
Code: [Select]
/etc/bind.new/named.conf
 /etc/bind.new/named.conf.options
 /etc/bind.new/logging.conf
 /etc/bind.new/rndc.conf
 /etc/bind.new/rndc.key
 /etc/bind.new/db.wright.local.zone
 /etc/bind.new/db.wright.local.rev
 /etc/dhcp3.new/dhcpd.conf
 /etc/resolv.conf.new

you are missing the e at the end of /etc/resolv.conf.new
and again here
Code: [Select]
File permissions:
 //    /etc/bind/named.conf   root:root   644
 //    /etc/bind/rndc.key     root:bind   640
 //    /etc/bind/rndc.conf    root:root   600
 //    /etc/resolv.conf       root:root   644
 //    /etc/bind              root:bind   775, chmod g+s => drwxrwsr-x
 //    /etc/dhcp3             root:root   755
 //    /etc/dhcp3/dhcpd.conf  root:root   644
 //
but you do put it here
Code: [Select]
sudo mv /etc/bind /etc/bind.original
 sudo mv /etc/bind.new /etc/bind
 sudo mv /etc/dhcp3 /etc/dhcp3.original
 sudo mv /etc/dhcp3.new /etc/dhcp3
 sudo mv /etc/resolve.conf /etc/resolve.conf.original
 sudo mv /etc/resolve.conf.new /etc/resolve.conf

I was having some issues at first until I realized what was happening.

In the end I finally received the following error. I was hoping some one could help me with it.
Code: [Select]
dcerouter_1030439:~# sudo rndc reload
WARNING: key file (/etc/bind/rndc.key) exists, but using default configuration file (/etc/bind/rndc.conf)
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not synchronized, or
* the key is invalid.

System = 10.04 core only install. Using the "LMCE-1004-20120730212926289.iso"
Thanks.
Title: Re: LMCE as DNS Server?
Post by: Marie.O on August 11, 2012, 08:23:35 pm
First I would like to make mention that their are some typing errors in the wiki.

So? FIX THEM!
Title: Re: LMCE as DNS Server?
Post by: tux-box1 on August 11, 2012, 09:16:24 pm
Uh, I was not aware that I had permission to do that!

Quote
This action has been automatically identified as harmful, and therefore disallowed. If you believe your edit was constructive, please contact an administrator, and inform them of what you were trying to do. A brief description of the abuse rule which your action matched is: Link spamming 2
Title: Re: LMCE as DNS Server?
Post by: _if_ on August 11, 2012, 09:22:48 pm
Uh, I was not aware that I had permission to do that!


your forum username and password should now work for the wiki as well...
Title: Re: LMCE as DNS Server?
Post by: l3mce on August 12, 2012, 02:56:58 am
I know this is old, but I wanted to post my experience with this.
First I would like to make mention that their are some typing errors in the wiki.
For example at the part where you sate
Code: [Select]
/etc/bind.new/named.conf
 /etc/bind.new/named.conf.options
 /etc/bind.new/logging.conf
 /etc/bind.new/rndc.conf
 /etc/bind.new/rndc.key
 /etc/bind.new/db.wright.local.zone
 /etc/bind.new/db.wright.local.rev
 /etc/dhcp3.new/dhcpd.conf
 /etc/resolv.conf.new

you are missing the e at the end of /etc/resolv.conf.new
and again here
Code: [Select]
File permissions:
 //    /etc/bind/named.conf   root:root   644
 //    /etc/bind/rndc.key     root:bind   640
 //    /etc/bind/rndc.conf    root:root   600
 //    /etc/resolv.conf       root:root   644
 //    /etc/bind              root:bind   775, chmod g+s => drwxrwsr-x
 //    /etc/dhcp3             root:root   755
 //    /etc/dhcp3/dhcpd.conf  root:root   644
 //
but you do put it here
Code: [Select]
sudo mv /etc/bind /etc/bind.original
 sudo mv /etc/bind.new /etc/bind
 sudo mv /etc/dhcp3 /etc/dhcp3.original
 sudo mv /etc/dhcp3.new /etc/dhcp3
 sudo mv /etc/resolve.conf /etc/resolve.conf.original
 sudo mv /etc/resolve.conf.new /etc/resolve.conf

I was having some issues at first until I realized what was happening.

In the end I finally received the following error. I was hoping some one could help me with it.
Code: [Select]
dcerouter_1030439:~# sudo rndc reload
WARNING: key file (/etc/bind/rndc.key) exists, but using default configuration file (/etc/bind/rndc.conf)
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not synchronized, or
* the key is invalid.

System = 10.04 core only install. Using the "LMCE-1004-20120730212926289.iso"
Thanks.

It is resolv.conf    not resolve.conf.

Probably why you had some issues.
Title: Re: LMCE as DNS Server?
Post by: tux-box1 on August 12, 2012, 03:15:31 am
That's really strange because the file resolv.conf is not found on the system. Edit: I miss-spoke on that, I did find it.
Also from the wiki..
Quote
Also create a new resolve.conf file:
Code: [Select]
sudo touch /etc/resolv.conf.newWhy would we use resolv.conf.new instead of resolve.conf.new ?
Quote
You will be creating or editing the following config files in these new directories
Code: [Select]
/etc/bind.new/named.conf
 /etc/bind.new/named.conf.options
 /etc/bind.new/logging.conf
 /etc/bind.new/rndc.conf
 /etc/bind.new/rndc.key
 /etc/bind.new/db.wright.local.zone
 /etc/bind.new/db.wright.local.rev
 /etc/dhcp3.new/dhcpd.conf
 /etc/resolv.conf.new
At least here it's consistent.
Quote
Change all the file permissions per instructions in named.conf:
Code: [Select]
File permissions:
 //    /etc/bind/named.conf   root:root   644
 //    /etc/bind/rndc.key     root:bind   640
 //    /etc/bind/rndc.conf    root:root   600
 //    /etc/resolv.conf       root:root   644
 //    /etc/bind              root:bind   775, chmod g+s => drwxrwsr-x
 //    /etc/dhcp3             root:root   755
 //    /etc/dhcp3/dhcpd.conf  root:root   644
 //
The same here still consistent.

Then here is where it all changes.
Quote
When and if you are feeling lucky, rename the original directories and then rename the new directories to take their place:
Code: [Select]
sudo mv /etc/bind /etc/bind.original
 sudo mv /etc/bind.new /etc/bind
 sudo mv /etc/dhcp3 /etc/dhcp3.original
 sudo mv /etc/dhcp3.new /etc/dhcp3
 sudo mv /etc/resolve.conf /etc/resolve.conf.original
 sudo mv /etc/resolve.conf.new /etc/resolve.conf

In that last bit of code at the bottom you have resolve.conf.new when you were using resolv.conf.new before.
But earlier we didn't name it resolve.conf.new we named it resolv.conf.new

I would be glad to change it but....
Quote
Posted by: tux-box1
Insert Quote
Uh, I was not aware that I had permission to do that!

Quote
This action has been automatically identified as harmful, and therefore disallowed. If you believe your edit was constructive, please contact an administrator, and inform them of what you were trying to do. A brief description of the abuse rule which your action matched is: Link spamming 2
Title: Re: LMCE as DNS Server?
Post by: l3mce on August 12, 2012, 03:26:10 am
I cannot tell you "why" about anything in Linux. I would blame this on shoddy English, which, fortunately for me, is the language most things are written in. I swear to God if the Chinese or anyone else wanted to hose us, they would rewrite the OS in their language... to DEAL with mine... and I would be fookin lost.

I can only tell you "what".
Title: Re: LMCE as DNS Server?
Post by: tux-box1 on August 12, 2012, 10:07:52 pm
I was able to fix my error by adding that e to the end of resolv.conf so I believe that is the issue. Is it possible for some one with more permission than I to edit the wiki, so that it is at least consistent?
The error was simply missing the e at the end of resolv.conf I don't know how else to explain it.
Thanks tho.
Title: Re: LMCE as DNS Server?
Post by: tux-box1 on August 13, 2012, 12:26:08 am
Wheather that file should have a e or not have a e isn't much of an issue. The issue here is the inconstancy. For the benefit of those who are unfamiliar with parsing code or copy paste monkeys. I feel that the wiki should use the same version of the file name in every case. 


When I did go in and try to make the wiki consistent. I received the following error.

Quote
This action has been automatically identified as harmful, and therefore disallowed. If you believe your edit was constructive, please contact an administrator, and inform them of what you were trying to do. A brief description of the abuse rule which your action matched is: Link spamming 2
Title: Re: LMCE as DNS Server?
Post by: l3mce on August 13, 2012, 01:20:27 am
reslov.conf is not a LinuxMCE thing... it is a linux thing.

At no point should anything ever need a resolve.conf

I will look at the issue in detail, and fix whatever is wrong, including the wiki. Thank you for your help. I will update this thread when it is done with a ticket and resolution. I am very sick today... so look for it over the next couple of days.
Title: Re: LMCE as DNS Server?
Post by: mkbrown69 on August 13, 2012, 04:05:21 am
Speaking as a *nix sysadmin who works on many Linux variants, plus Solaris, HP-UX, and AIX, I can tell you for a fact that a system's local DNS config file is /etc/resolv.conf (without an ending 'e').

If you want to find out what's supposed to be in that file as far as config options go, try 'man resolv.conf' from the command line.  You can use the 'nslookup' command to test your DNS config (man nslookup to see how to use it).

HTH!

/Mike
Title: Re: LMCE as DNS Server?
Post by: tux-box1 on August 14, 2012, 04:05:06 am
I did figure out that it is resolv with out a e for the proper way the file is to be named. This is not the issue that I'm trying to address.
I'm trying to be clear, but for what ever reason something is being lost in the message.

The Wiki has "resolve.conf" that's resolv with the e, not with out the e as it needs to be. I have tried to edit the wiki as suggested.

Quote
Posted by: posde
Insert Quote
Quote from: tux-box1 on 11 August 2012, 13:21:10
First I would like to make mention that their are some typing errors in the wiki.

So? FIX THEM!

but have received the following error.
Code: [Select]
This action has been automatically identified as harmful, and therefore disallowed. If you believe your edit was constructive, please contact an administrator, and inform them of what you were trying to do. A brief description of the abuse rule which your action matched is: Link spamming 2
Would some one who has higher editing permissions please edit the following places in the wiki.

Under installation.
Quote
Also create a new resolve.conf file:
Needs to read
Quote
Also create a new resolv.conf file:

Under wrapping up
Code: [Select]
sudo mv /etc/resolve.conf /etc/resolve.conf.original
sudo mv /etc/resolve.conf.new /etc/resolve.conf
Should read
Code: [Select]
sudo mv /etc/resolv.conf /etc/resolv.conf.original
sudo mv /etc/resolv.conf.new /etc/resolv.conf
The only thing that has changed is the removing of the e in resolve.conf to make it resolv.conf

Every thing else is fine.


Edit: I was able to make the edits to the wiki needed. It all reads the same with "resolv.conf"
thank you for your patience.
Title: Re: LMCE as DNS Server?
Post by: l3mce on August 14, 2012, 05:23:41 am
I was able to fix my error by adding that e to the end of resolv.conf so I believe that is the issue. Is it possible for some one with more permission than I to edit the wiki, so that it is at least consistent?
The error was simply missing the e at the end of resolv.conf I don't know how else to explain it.
Thanks tho.

This was what confused me. The wiki was a secondary concern to me if there was some CODE looking for a file that should not exist.

Thank you for fixing the errant wiki.