HowTo setup Local DNS/DHCP Plugin

    • OMV 1.0

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • HowTo setup Local DNS/DHCP Plugin

      Hey,

      I would like to test the Local DNS/DHCP Plugin from OpenMediaVault but it seems that I need some help.

      DHCP is working properly, but with DNS I have some problems.
      Target is to get at least my NginX-Site hosted by OMV resolved by name in my LAN. (Site is only used in my Intranet, it's not served to the Internet.)

      As I understood could that be realized with the DNS/DHCP Plugin.

      If I could resolve my other pages by name (TV-Server etc.) which are not hosted by OMV would be very nice but not necessary.

      The settings of the DNS-DHCP Plugin are attached as Screenshots.
      OMV-Server has the adress 192.168.1.109, my Router has 192.168.1.2.
      My NginX-Site is set to name-based with the Servername jukebox.lan on Port 90.
      Target should be to reach this site via adress jukebox.lan in my Browser.

      Thanks for your help.
      Images
      • dnsdhcp1.jpg

        133.08 kB, 1,271×630, viewed 5,386 times
      • dnsdhcp2.jpg

        126.02 kB, 1,271×629, viewed 4,325 times
    • For starters, are you using the DNSMasq plugin v1.0.2 (that is the latest build to my knowledge)?

      Secondly, I see that under DNS Servers you entered both the OMV system and your router 192.168.1.2, I would remove the router IP.

      Also, I see that your NginX-Site system is not a DHCP member, so on that system have you manaully configured it's network to have a workgroup or setting of "lan"?

      Lastly, did you enter jukebox and 192.168.1.109 under the Static Entries tab section?

      Maybe unrelated, but under the OMV System, Network, General and DNS Server tabs, did you match the "Domain Name" of lan and what DNS Servers did you enter here?
    • cadre wrote:

      For starters, are you using the DNSMasq plugin v1.0.2 (that is the latest build to my knowledge)?

      I'm using DNSMasq Plugin V1.0.3.

      Secondly, I see that under DNS Servers you entered both the OMV system and your router 192.168.1.2, I would remove the router IP.


      Ok, Router IP is removed.

      Also, I see that your NginX-Site system is not a DHCP member, so on that system have you manaully configured it's network to have a workgroup or setting of "lan"?


      The NGinX-Site is hosted through my OMV-System (192.168.1.109) which is configured under Static-IPs Section.
      I have set the NGinX-Site to name-based on Server-Name "jukebox.lan". See attached Picture.
      Or what do you mean?

      Lastly, did you enter jukebox and 192.168.1.109 under the Static Entries tab section?

      No I didn't. Now it's entered. But now the IP x.x.1.109 is enterd twice under Static Entries. (Regular OMV-System, and "jukebox".)
      Is that right?

      Maybe unrelated, but under the OMV System, Network, General and DNS Server tabs, did you match the "Domain Name" of lan and what DNS Servers did you enter here?


      Under Tab General I entered the Hostname of my OMV-System, Domain-Name is "lan".
      DNS-Servers are primary my OMV-System (192.168.1.109), secondary my Router, otherwise I have no access to the Internet.

      Now I'm so far that I'm able to reach the NGinX-Site via the adress "jukebox.lan:444" (Port 444 for SSL, 443 is reserved for OMV-WebGUI).
      If I navigate to the adress "http://jukebox.lan" (without an Port) I get my OMV-Login Page.

      Target was to be able to reach the Nginx-Site without typing the Port-Number.

      Thanks a lot for your help.
      Images
      • nginxjukebox1.jpg

        61.1 kB, 396×583, viewed 2,517 times
    • Glad some of that worked. If some of your client stations are running windows, then you can modify the DNS settings so that any of your hosts configured through the DNS plugin will resolve without having to type in the ".lan" In your Windows client, modify the network adapter's TCP/IP setttings, then click the "Advanced" button, then under the "DNS" tab simply enter your workgroup name of "lan" in the field labeled "DNS Suffix for this connection". See attached, example of 2008 R2 server.

      In my network, OMV system is 192.68.1.24, and my gateway is 192.168.1.254. There are no devices on my network hosting any DNS or DHCP services except for the OMV system via the DNS/DHCP plugin. Every device with an internal NIC references the OMV system for DNS. This configuration works excellent for me.

      In my case my workgroup name is "BW" which in entered both under the OMV System, Network, General tab; as well as under the DNS plugin, Settings, General tab. Also here the only DNS server that I list is the OMV system.

      BUT, for the OMV system, Network, DNS Server tab, I entered two public (OpenDNS) servers. Internal and external DNS resolution works great, even on the OMV system of course.
      Images
      • Windows host DNS settings.PNG

        54.66 kB, 1,018×662, viewed 3,094 times
    • cadre wrote:

      Glad some of that worked. If some of your client stations are running windows, then you can modify the DNS settings so that any of your hosts configured through the DNS plugin will resolve without having to type in the ".lan" In your Windows client, modify the network adapter's TCP/IP setttings, then click the "Advanced" button, then under the "DNS" tab simply enter your workgroup name of "lan" in the field labeled "DNS Suffix for this connection". See attached, example of 2008 R2 server.

      I'm glad, too. It's half the way to my target :) Thanks a lot till here.

      Sorry, there is no Windows-Machine running in my Network.
      There are only Linux-based-Systems (OMV, several OpenELEC's , lots of iOS-Devices and a Macbook) in my network.

      In my network, OMV system is 192.68.1.24, and my gateway is 192.168.1.254. There are no devices on my network hosting any DNS or DHCP services except for the OMV system via the DNS/DHCP plugin. Every device with an internal NIC references the OMV system for DNS. This configuration works excellent for me.

      I'm on my way to do exactly that! Started today with the DNS/DHCP-Plugin so I haven't updated all Clients yet. But I will.


      In my case my workgroup name is "BW" which in entered both under the OMV System, Network, General tab; as well as under the DNS plugin, Settings, General tab. Also here the only DNS server that I list is the OMV system.

      BUT, for the OMV system, Network, DNS Server tab, I entered two public (OpenDNS) servers. Internal and external DNS resolution works great, even on the OMV system of course.


      I tested this now, too. (Primary and secondary DNS on Public-Servers). I was not sure if the primary DNS has to be my OMV-Machine because of the DNS for my intranet or not.
      It seems to have not. It's working with two public servers also.

      But there are still 2 things annoying me:
      - Now, I have to type: "http://" for my jukebox-page in Intranet, and
      - I have to type the Port-Number into adressbar.
      Otherwise, if I type simply "jukebox.lan" into adressbar, I'll be referred to the OMV-Login-Page.

      The point is:
      This Jukebox-Page is an html/php-Page, mainly for my friends/guests which are connected to my WLAN. With this page they can simply add Music-Tracks from my XBMC-Database to an actual Playlist on my HTPC.
      So would it be very nice to type simply "jukebox.lan" into adressbar to get to this page and not to my OMV-page.

      And it's even "cleaner" if you don't have to type "http" and the Port....

      And who knows, maybe there are coming more pages in future...
      Would be awesome if somebody has any solution for this....
    • subzero79 wrote:

      Read the proxy pass guide I mention before for eliminating the port typing.


      That helped very well!
      I set my other WebGUIs in the "multi_host" File as well and it's all working via the DNS now except the site jukebox.lan via Safari.
      In Firefox it works as it should. Empty Cache etc. in Safari is not helping. But I think I will figure it out.

      Thanks a lot! And sorry I overlooked this hint in the other Thread....
    • bit of a dredge but this thread consistently comes up when I search google for deets on how to set up dhcp/dns on OMV.

      can anyone point me to a howto guide on installing this? I've managed to download the zip from github but am unsure what the process is to install this.
      feeling confident I'll be able to iron out config etc but just not sure how I'd install the daemon (or whatever it is OMV refers to these services as)...

      thank in advance
    • nm.. managed to ferret out an answer... in case others need it
      I used:
      wget http://omv-extras.org/debian/pool/main/o/openmediavault-dnsmasq/openmediavault-dnsmasq_1.0.3_all.deb
      (bearing in mind, the package is a point in time so the name may/will change)
      dpkg -i openmediavault-dnsmasq_1.0.3_all.deb

      then refresh the browser on OMV to see the plugin for configuation.
      if I run into more obvious guff I'll update here (unless I'm not supposed to? in which case - sorry bout that)
    • The dnsmasq plugin is in the omv-extras testing repo for OMV 1.x and 2.x. No need to download anything from github or install packages manually.

      openmediavault-dnsmasq | 1.0.3 | kralizec-testing | i386, amd64, armel, armhf
      openmediavault-dnsmasq | 2.1 | stoneburner-testing | i386, amd64, armel, armhf, powerpc
      omv 4.0.11 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • Do we have a dnsmasq or any other dns server plugin for omv3? I do not find anything in omv extras (and omv extras testing) repo.

      Greetings Hoppel
      ---------------------------------------------------------------------------------------------------------------
      frontend software - android tv | libreelec | win10 | kodi krypton
      frontend hardware - nvidia shield tv | odroid c2 | yamaha rx-a1020 | quadral chromium style 5.1 | samsung le40-a789r2 | harmony smart control
      -------------------------------------------
      backend software - debian | kernel 4.4 lts | proxmox | openmediavault | zfs raid-z2 | docker | emby | vdr | vnsi | fhem
      backend hardware - supermicro x11ssh-ctf | xeon E3-1240L-v5 | 64gb ecc | 8x4tb wd red | digital devices max s8
      ---------------------------------------------------------------------------------------------------------------------------------------
    • hoppel118 wrote:

      Do we have a dnsmasq or any other dns server plugin for omv3?
      Nope. I did not port it to the latest OMV 3.x. It is on my abandoned plugin list. Someone else is free to port it.
      omv 4.0.11 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • HowTo setup Local DNS/DHCP Plugin

      Sadly I am not a developer. Thanks for information.
      ---------------------------------------------------------------------------------------------------------------
      frontend software - android tv | libreelec | win10 | kodi krypton
      frontend hardware - nvidia shield tv | odroid c2 | yamaha rx-a1020 | quadral chromium style 5.1 | samsung le40-a789r2 | harmony smart control
      -------------------------------------------
      backend software - debian | kernel 4.4 lts | proxmox | openmediavault | zfs raid-z2 | docker | emby | vdr | vnsi | fhem
      backend hardware - supermicro x11ssh-ctf | xeon E3-1240L-v5 | 64gb ecc | 8x4tb wd red | digital devices max s8
      ---------------------------------------------------------------------------------------------------------------------------------------
    • hoppel118 wrote:

      Sadly I am not a developer. Thanks for information.
      There are dockers out there for dnsmasq that include a web interface.
      omv 4.0.11 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • HowTo setup Local DNS/DHCP Plugin

      Installed dnsmasq per command line.

      Greetings Hoppel
      ---------------------------------------------------------------------------------------------------------------
      frontend software - android tv | libreelec | win10 | kodi krypton
      frontend hardware - nvidia shield tv | odroid c2 | yamaha rx-a1020 | quadral chromium style 5.1 | samsung le40-a789r2 | harmony smart control
      -------------------------------------------
      backend software - debian | kernel 4.4 lts | proxmox | openmediavault | zfs raid-z2 | docker | emby | vdr | vnsi | fhem
      backend hardware - supermicro x11ssh-ctf | xeon E3-1240L-v5 | 64gb ecc | 8x4tb wd red | digital devices max s8
      ---------------------------------------------------------------------------------------------------------------------------------------
    • HowTo setup Local DNS/DHCP Plugin

      My omv3 is a kvm under proxmox. So I decided to use the proxmox host for dnsmasq. I do not use pxe.

      Greetings Hoppel
      ---------------------------------------------------------------------------------------------------------------
      frontend software - android tv | libreelec | win10 | kodi krypton
      frontend hardware - nvidia shield tv | odroid c2 | yamaha rx-a1020 | quadral chromium style 5.1 | samsung le40-a789r2 | harmony smart control
      -------------------------------------------
      backend software - debian | kernel 4.4 lts | proxmox | openmediavault | zfs raid-z2 | docker | emby | vdr | vnsi | fhem
      backend hardware - supermicro x11ssh-ctf | xeon E3-1240L-v5 | 64gb ecc | 8x4tb wd red | digital devices max s8
      ---------------------------------------------------------------------------------------------------------------------------------------
    • I ported the damn dnsmasq plugin. It isn't in a repo because I can't really test it.

      http://omv-extras.org/testing2/openmediavault-dnsmasq_3.1_all.deb

      I don't want to spend much more time on this...
      omv 4.0.11 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • If I enable the DHCP option, I got this error.
      Then my dns stop working.
      On OMV2, I'm not required to enable DHCP, and it's worked.

      Source Code

      1. Error #0:
      2. exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; systemctl restart dnsmasq 2>&1' with exit code '1': Job for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details.' in /usr/share/php/openmediavault/system/process.inc:175
      3. Stack trace:
      4. #0 /usr/share/php/openmediavault/system/systemctl.inc(83): OMV\System\Process->execute(Array, 1)
      5. #1 /usr/share/php/openmediavault/system/systemctl.inc(154): OMV\System\SystemCtl->exec('restart', NULL, false)
      6. #2 /usr/share/openmediavault/engined/module/dnsmasq.inc(42): OMV\System\SystemCtl->restart()
      7. #3 /usr/share/openmediavault/engined/rpc/config.inc(163): OMVModuleDnsmasq->applyConfig()
      8. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      9. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      10. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      11. #7 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusGM...', '/tmp/bgoutputSe...')
      12. #8 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      13. #9 /usr/share/openmediavault/engined/rpc/config.inc(208): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      14. #10 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      15. #11 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      16. #12 /usr/share/php/openmediavault/rpc/rpc.inc(84): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      17. #13 /usr/sbin/omv-engined(516): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      18. #14 {main}
      Display All



      When I tried to turn off the plugin, I got an error too:

      Source Code

      1. Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; systemctl restart dnsmasq 2>&1' with exit code '1': Job for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details.


      Source Code

      1. systemctl status dnsmasq.service
      2. ● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
      3. Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled)
      4. Drop-In: /run/systemd/generator/dnsmasq.service.d
      5. └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
      6. Active: failed (Result: exit-code) since Fri 2016-12-23 18:06:36 EST; 14s ago
      7. Process: 23087 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=1/FA ILURE)
      Images
      • dnsmasq.jpg

        233.42 kB, 963×842, viewed 634 times
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 4 times, last by tinh_x7 ().