*New 11.4 series Release:
2020-07-03: XigmaNAS 11.4.0.4.7633 - released!

*New 12.1 series Release:
2020-04-17: XigmaNAS 12.1.0.4.7542 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

EXTENSION dhcp-server

XigmaNAS Extensions / Add-ons

Moderator: crest

Forum rules
Set-Up GuideFAQsForum Rules
User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

EXTENSION dhcp-server

#1

Post by alexey123 »

I create webgui panel for isc-dhcp server. This extension may be used, when you want build diskless stansions, but not have DDWRT router or another dhcp server.
Install procedure
1. Connect over ssh to NAS4Free and create folder for DHCP server. I use for applications folder /mnt/disk/app and I create /mnt/disk/app/dhcp for it

Code: Select all

mkdir /mnt/disk/app/dhcp
cd /mnt/disk/app/dhcp
fetch https://sites.google.com/site/aganimkarmiel/home/free-time/file-sharing/dhcp.tbz
 tar xzvf dhcp.tbz
./install.sh
Now you can view menu

Code: Select all

Console setup
-------------
1) Install DHCP-light
2) Uninstall DHCP-light
8) Exit
For install - press 1. and when script will answer "DHCP-light installed. Check webgui extension" go to web gui.

First server page is
Image

Subnets page
Image
Into aux parameters can be added any not defined options, but need add without world option
Example:
option domain-name "mydomain.org" ====> Need add domain-name "mydomain.org"
option netbios-name-servers <IPadress> ====> netbios-name-servers <IPadress>

Host declaration
Image

Work on full and embedded, x86 and x64 versions

Enjoy
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
raulfg3
Site Admin
Site Admin
Posts: 5116
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#2

Post by raulfg3 »

Thanks Alexey123, good app, and easy to install.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

HP T510

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#3

Post by alexey123 »

Thank you, Raul.
But I continue to work with it. I replace now page for subnet - for better understand.
Image

And host with TFTP booting - as example
Image

Small bug ( I forgot rename filename for restart command ) also repaired. Now DHCP listen all interfaces - I plan make menu for interface choice in future.

Now extension store into config.xml 4 values:

Code: Select all

<dhcplight>
		<homefolder>/mnt/data/app/dhcp/</homefolder>
		<enable>yes</enable>
</dhcplight>
And command postinit for start server and shutdown for stop it.

File dhcp.conf stored into /mnt/path/to /dhcp/conf/dhcpd.conf and extension read and write settings into this file
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

LipaM
NewUser
NewUser
Posts: 1
Joined: 27 Jun 2013 23:43
Status: Offline

Re: EXTENSION dhcp-server

#4

Post by LipaM »

Hi,
I can't start the service, at save nothing change.

mitch99
NewUser
NewUser
Posts: 2
Joined: 14 Oct 2013 09:31
Status: Offline

Re: EXTENSION dhcp-server

#5

Post by mitch99 »

Hi,
installs this dhcp server on nas4free latest version, but the settings are not saved, it can be is related with a version nas4free ?.
Thanks.

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#6

Post by alexey123 »

I'll rewrite this extension at this week - it not work properly.
Also I want use dnsmasq instead isc-dhcp - it know work as name server for zone local.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

mitch99
NewUser
NewUser
Posts: 2
Joined: 14 Oct 2013 09:31
Status: Offline

Re: EXTENSION dhcp-server

#7

Post by mitch99 »

thank you very much, I tried on other versions also not working.
thanks

lookdaddy
NewUser
NewUser
Posts: 6
Joined: 31 Dec 2012 15:45
Status: Offline

Re: EXTENSION dhcp-server

#8

Post by lookdaddy »

how does it get the extension to be dhcp for a specific ethernet port on the server

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: EXTENSION dhcp-server (dnsmasq based)

#9

Post by alexey123 »

New attempt to make DHCP server for nas4free. Now based on dnsmasq. Why? My routers not have option define tftp server, also I want call computers by name, not by IP address
Test only now! <--- As for me extension ready for use it. I add some filters and Download config function
https://github.com/alexey1234/nas4free-dnsmasq

First page (big size)
http://s020.radikal.ru/i705/1312/ec/59c3d995fb63.png

Dnsmasq use as DNS for local network ( address on webpage also by name)
Image

Why gthub? For simple update extension

Installation procedure some as Thebrig.

Code: Select all

fetch https://raw.github.com/alexey1234/nas4free-dnsmasq/master/dnsmasq_install.sh
Install

Code: Select all

sh dnsmasq_install.sh /path/to/extension/folder
How to use extension.
1. I not compille anything, I create web page for simple configure dnsmasq config file. It build as /etc/dnsmasq.conf. All config may be bypassed if add to /etc/rc.conf entry over webgui

Code: Select all

dnsmasq_conf="/mnt/path/to/your/config"
2. When extension installed, it have 4 folders
tftproot <----- Folder for builtin tftp server.
conf <---- empty folder for additional config. Files <filename>.bak or <filename>~ will ignored
sbin <----binary and scripts
www <--- webgui
3. On webpage Colorized table "Hosts" If it have yellow color - dnsmasq daemon not running, if it have green color - dnsmasq is run
4. If not define Start and End adress - DHCP server not started, DnsMasq will work only as DNS forvarder.
=======================
DHCP-server on ( define Start and End address )
Hosts page.
Dnsmasq can read /etc/hosts file, tab Network|Hosts and work as DNS server for intranet. If intranet host defined into /etc/hosts, need declare only hostname into Extensions|Dnsmasq|Hosts tab - call it by "+" from front page
If need pseudostatic host by MAC address -define MAC +IP. Also may be defined hostname, but it usefull only for iPXE.
Lease time : numerical, minutes. If not define it - extension make it as infinite
====================
Log:
For normal work please use system value, but possible use 2 debug levels. Setting by combobox in front page
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

filius27
NewUser
NewUser
Posts: 13
Joined: 16 Jan 2014 22:53
Status: Offline

Re: EXTENSION dhcp-server

#10

Post by filius27 »

The EXTENSION dhcp-server, you can only in english save. In German save, nothing change.

User avatar
lindsay
Forum Moderator
Forum Moderator
Posts: 299
Joined: 23 Jun 2012 09:59
Location: Steinkjer,Norway
Status: Offline

Re: EXTENSION dhcp-server

#11

Post by lindsay »

There is no problem to have a second DHCP server, but not in the same range ;)
Nice to see more extentions
Protected by smoothiebox Red,Green,
Purple,Orange Zones/VLAN`s
Powered by AMD A10-6700T


XigmaNAS Box-1 11.2.0.4 - Omnius (revision 6625)
Platform : x64-embedded on 2X Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
Motherboard: ASUS Z10PA-D8, 2xSocket-2011-3
SATA Controllers : 1X Avago Technologies (LSI) SAS2008 and 1x Avago Technologies (LSI) SAS2308
Pool 1 (Media-Pool) 8X4TB in raidz2
Pool 2 (Media-Pool-2) 4X2TB in raidz2 and 2X2TB in mirror mirror and 2X3TB in mirror
Pool 3 (Media-Pool-3) 2X2TB in mirror and 2X4TB in mirror and 2X1TB in mirror

karlandtanya
Starter
Starter
Posts: 50
Joined: 23 Jan 2014 15:31
Location: nelson twp, OH, USA
Status: Offline

Re: EXTENSION dhcp-server

#12

Post by karlandtanya »

Thank you for your excellent extension! This and thebrig make nas4free very powerful for me.
I have a primary and backup file server and also try to use them for primary and backup dhcp/dns servers (not overlapping dhcp ranges, of course)
Because some clients could get address from one or the other, I try to add external config for dns to look at both servers, then google.

Now it seems that the external-config option is ignored

Perhaps I am doing something incorrectly?
Has anyone else seen this issue?
Is there something I should do differently to make this function? (what?)

Thanks to anyone who might offer a suggestion

Here is the version as reported by nas4free:
Version 9.2.0.1 - Shigawire (revision 972)
Build date Mon Apr 28 02:43:01 CEST 2014
Platform OS FreeBSD 9.2-RELEASE-p4 (kern.osreldate: 902001)
Platform x64-embedded on Intel(R) Pentium(R) D CPU 2.80GHz

First, make an external config:

Here is my external config:

Code: Select all

# ls -la /mnt/data/extension/dnsmasq/conf
total 31
drwxr-xr-x  2 root  wheel   3 Jun 13 06:59 .
drwxr-xr-x  6 root  wheel   8 Jun 13 06:36 ..
-rw-r--r--  1 root  wheel  48 Jun 13 06:59 ext_dns.conf
# cat ext_dns.conf 
dhcp-option=6,10.10.137.13,10.10.137.12,8.8.8.8

Next, tick the checkbox to enable it and then [Save]
Image

Immediately after [Save], the checkbox is empty again:
Image

Here is the exported dnsmasq config after select the checkbox and save

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<NAS4Free revision="972" version="9.2.0.1">
	<rootfolder>/mnt/data/extension/dnsmasq/</rootfolder>
	<enable />
	<extconfig />
	<logging>mini</logging>
	<startadr>10.10.137.150</startadr>
	<endadr>10.10.137.199</endadr>
	<leasecount>150</leasecount>
	<tftproot />
</NAS4Free>

User avatar
F8BOE
experienced User
experienced User
Posts: 106
Joined: 03 Jun 2013 23:09
Location: France
Status: Offline

Re: EXTENSION dhcp-server

#13

Post by F8BOE »

Hello,

I installed the dhcp extension yesterday, all went smooth. But after reboot, it dissappeared from the extension menu.
HP Vectra VL, Pentium II 400 MHz, 768 MB RAM (PC100), 3.0 TB HDD capacity, NAS4Free 9.2.0.1.972

I don't think that it could be a harware problem... The extension dedicated USB stick still works and is sane.

Ciao @+

User avatar
raulfg3
Site Admin
Site Admin
Posts: 5116
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#14

Post by raulfg3 »

perhaps do you use live version?.

you need embeded or full to use.

Please post a screen capture of your postinit webGUI config when work and after reboot ( when do not work).
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

HP T510

User avatar
F8BOE
experienced User
experienced User
Posts: 106
Joined: 03 Jun 2013 23:09
Location: France
Status: Offline

Re: EXTENSION dhcp-server

#15

Post by F8BOE »

Thanks for the quick answer.

I also have problems with other extensions, so I'll first try to reinstall the stuff on any of the internal drives.

Ciao @+

User avatar
F8BOE
experienced User
experienced User
Posts: 106
Joined: 03 Jun 2013 23:09
Location: France
Status: Offline

Re: EXTENSION dhcp-server

#16

Post by F8BOE »

Hello,

Now I reinstalled all the extension programms on an internal HDD. Minidlna appears in the extension menu and runs approximatively, but dhcp extension does no more appear in the extension menu after reboot, so no need to get a picture of it... It is simply not in the menu anymore.

As there's a known GUI language issue with minidlna, I used the same procedure to install both extensions when runninng the english GUI, rebooted with the english GUI to see that the dhcp menu dissappeared, so it's probably not a language problem...

I'm trying to find out how I could reactivate the process without reinstalling it...

Code: Select all

  PID USERNAME      THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
 3246 root            1  24    0 16088K  3248K kqread   0:36  0.59% lighttpd
 8636 root            2  34    0 21556K  7564K accept   1:11  0.00% mt-daapd
 7064 root            4  20    0  9456K   676K rpcsvc   0:03  0.00% nfsd
 6813 root            1  20    0 15228K  1708K select   0:01  0.00% nmbd
 2615 root            1  20    0 12548K  1504K select   0:01  0.00% proftpd
 6817 root            1  22    0 25820K  2076K select   0:01  0.00% smbd
 9368 root            1  20    0 32156K  9464K select   0:01  0.00% minidlna
 2466 root            1  20    0 12024K  1848K kqread   0:01  0.00% lighttpd
 7022 root            1  21    0  9548K  1448K select   0:00  0.00% mountd
 9454 root            1  20    0 12796K  3864K select   0:00  0.00% proftpd
 3265 root            1  20    0  9464K   888K nanslp   0:00  0.00% inadyn
 9482 root            1  52    0 30964K 11092K piperd   0:00  0.00% php-cgi
 2218 root            1  20    0  9580K   744K select   0:00  0.00% syslogd
 7062 root            1  20    0  9456K  1104K select   0:00  0.00% nfsd
 6867 root            1  20    0  9576K   840K select   0:00  0.00% rpcbind
 3524 root            1  41    0  9876K  1360K pause    0:00  0.00% csh
 6819 root            1  20    0 25820K  2172K select   0:00  0.00% smbd
 9396 www             1  20    0 11840K  3088K kqread   0:00  0.00% lighttpd
It is definitely not running...

For info, I run the NAS since ver. 0.69.3017 embedded on a 2GB CF-card. Actually NAS4Free 9.2.0.1.972 updated from a fresh installed 9.2.0.1.943

Ciao @+

User avatar
F8BOE
experienced User
experienced User
Posts: 106
Joined: 03 Jun 2013 23:09
Location: France
Status: Offline

Re: EXTENSION dhcp-server

#17

Post by F8BOE »

And no way to reactivate dhcp...

Just after reinstallation all things run well...

Hmmm... but when I want to save the changes it tells me "Something's wrong in the dhcpd.conf file"... I wonder what...

Yeah, and all this configuration in the english web-GUI! Untill here is the programm all good...

And then... That after reboot in the english web-GUI, I have no dhcp in the Extension menu!

After reboot in the french-GUI status idem...

I hope it's not a problem when I don't want to installl the extensions in /mnt/disk/app/dhcp because I want to use /mnt/HD04/Extensions/dhcp

Ciao @+

bupban
NewUser
NewUser
Posts: 6
Joined: 31 Aug 2014 09:36
Status: Offline

Re: EXTENSION dhcp-server

#18

Post by bupban »

Hi

First of all, thanks to alexey123 for the great work (on the brig and dnsmasq, especially).
And also thanks to all the others here in the forum - great work and discussions that helped me a lot to get up my N4F with a few extensions and jails.

I also tried to install the dnsmasq-extension as described here - but I got the same error as described by f8boe: After installing the dnsmasq-extension and refreshing the GUI, it seems to work. As soon as I reboot, the extension is gone.

So, I had a look at the source code itself. It seems that there are some typos in there. And these typos prevent the guy-xml-file from being correctly updated.
After correcting them, the dnsmasq-extension is fully working for me, even after reboot it is still there and works as it should.

My steps:
I downloaded the master.zip from git (see dnsmasq_install.ch for URI), extracted it and changed 3 files:

1. sbin/change_ver.php
original line 18: if (is_file("/tmp/thebrigversion") ) unlink ("/tmp/thebrigversion");
-> change "thebrigversion" to "dnsmasqversion"

2. www/extension_dnsmasq_conf.php
original line 82: header("Location: extensions_thebrig.php");
-> change "extensions_thebrig.php" to "extensions_dnsmasq.php"

3. www/extension_dnsmasq_clients.php
original line 20: <!--<li class="tabinact"><a href="extensions_thebrig_log.php"><span><?=gettext("Log");?></span></a></li> -->
-> change "extensions_thebrig_log.php" to "extensions_dnsmasq_log.php"

4. After running dnsmasq_install.sh again it should work (ok, some tweaking of the script desired since you do not need to download the master.zip again - you already have it, unpacked it and updated it as described before ;) So, just comment out those lines

One last hint: The script is saying to go to the N4F webGUI and hit "Save". Well, the button is actually labeled "Action", not "Save"

Hope this will work for others, too.

User avatar
raulfg3
Site Admin
Site Admin
Posts: 5116
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#19

Post by raulfg3 »

please can you attach your moddified script for other users.

Thanks.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

HP T510

bupban
NewUser
NewUser
Posts: 6
Joined: 31 Aug 2014 09:36
Status: Offline

Re: EXTENSION dhcp-server

#20

Post by bupban »

No prob. Instead of writing down all the necessary diffs I took the latest master.zip from alexey123, patched it completely and zipped it again.

Here is the patched version of master.zip:
master_bupban.tgz
To install:

Code: Select all

1. mkdir tmp
2. cp master_bupban.tgz tmp
3. cd tmp
4. tar zxf master_bupban.tgz
5. sh dnsmasq_install.sh
This should do the job.
You do not have the required permissions to view the files attached to this post.

Geegsie
NewUser
NewUser
Posts: 2
Joined: 22 Nov 2014 23:17
Status: Offline

Re: EXTENSION dhcp-server

#21

Post by Geegsie »

Sorry, this is my first post ever, I hope this is not inappropriate.
I've been running nas4free for 18 months with cifs and nfs shares from a zfs pool but I'd really like my nas4free box to also be a simple DNS/dhcp server.
A big thankyou to alexey123, raulfg3, fsbruva and locslikes(on youtube).
I've looked over various posts and forums but still am not sure of how to proceed.
I'm not sure how this topic viewtopic.php?f=71&t=3002 fits in with the other info I have.

I've already run "thebrig_install.sh" from viewtopic.php?f=79&t=3894
and have the brig up and running.
I've created a jail for my dns server (I'm going to use dnsmasq) but my questions are

1. does "dnsmasq_install.sh" install into the new jail I've created, or
2. does "dnsmasq_install.sh" create a new jail for itself, or
3. does "dnsmasq_install.sh" just run by itself and create an extension to the Nas4free Web-Gui (ie not use a jail at all)

if (3.) is correct, can I just remove the jail I created and delete the brig extension?
or...

4. would I be better running my dns/dhcp in a jail and install dnsmasq manually inside the jail?

if (4.) is correct (or at least a feasible option) could I use webmin to access the jail's IP address and help configure dnsmasq?

Thanks for all your postings already and hopefully for any response I might get.

Geegsie

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#22

Post by alexey123 »

Geegsie wrote: I've created a jail for my dns server (I'm going to use dnsmasq) but my questions are

1. does "dnsmasq_install.sh" install into the new jail I've created, or
2. does "dnsmasq_install.sh" create a new jail for itself, or
3. does "dnsmasq_install.sh" just run by itself and create an extension to the Nas4free Web-Gui (ie not use a jail at all)

if (3.) is correct, can I just remove the jail I created and delete the brig extension?
or...

4. would I be better running my dns/dhcp in a jail and install dnsmasq manually inside the jail?

if (4.) is correct (or at least a feasible option) could I use webmin to access the jail's IP address and help configure dnsmasq?

Thanks for all your postings already and hopefully for any response I might get.

Geegsie
Hi
Dnsmasq extension work from main host, not under jail. In general it isjust webgui helper for write dnsmasq.conf file. I wrote this extension because my routers not support option "nex server" -> for diskless machines and PXE works.
When I tried to run dhcp server under jail, I was have problems ( I not remember what problems was, but I not like its ).
For ipxe boot I use script, placed into conf folder ( under dhcp folder ). I find this script on ipxe forum http://forum.ipxe.org/

Code: Select all

# dnsmasq configuration for iPXE
# by stefanl@nersc.gov, 2012-12-01

# Borrowed from http://www.heath-bar.com/projects/blog/?p=326
# and http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example

# Important note: The syntax in this file requires dnsmasq 2.53 or above.
# RHEL6 ships with dnsmasq 2.48, which uses older syntax.

### Special DHCP options for iPXE

### Borrowed from http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example
# Boot for iPXE. The idea is to send two different
# filenames, the first loads iPXE, and the second tells iPXE what to
# load. The dhcp-match sets the ipxe tag for requests from iPXE.
# Important Note: the 'set:' and 'tag:!ipxe' syntax requires dnsmasq 2.53 or above.
dhcp-match=set:ipxe,175 # iPXE sends a 175 option.
# load undionly.kpxe for clients not tagged with 'ipxe'.
dhcp-boot=tag:!ipxe,undionly.kpxe
# undionly.kpxe issues a second DHCP request and we then serve bootstrap.ipxe over http 
# using Robin Smidsrød's bootstrap method provided at https://gist.github.com/2234639 
#dhcp-boot=http://10.37.129.3/bootstrap.ipxe
# Or, simply load your own menu
dhcp-boot=tag:ipxe,menu.ipxe
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Geegsie
NewUser
NewUser
Posts: 2
Joined: 22 Nov 2014 23:17
Status: Offline

Re: EXTENSION dhcp-server

#23

Post by Geegsie »

Thanks alexey123 for you help.

I'll try "dnsmasq_install.sh", im sure it will be great.

thanks also for the tip about ipxe script, that's the next thing I was going to try.

Geegsie

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#24

Post by alexey123 »

For give to run dnsmasq extension on 9.3 nased NAS4Free need simple edit startup script and add labeled by red lines
if ( !is_link ( "/usr/local/sbin/dnsmasq") ) symlink ( $config['dnsmasq']['rootfolder']."sbin/dnsmasq","/usr/local/sbin/dnsmasq"); else {}
if ( !is_file ( "/usr/local/lib/libidn.so.17") || !is_link ( "/usr/local/lib/libidn.so.17")) symlink ( "/usr/local/lib/libidn.so.11","/usr/local/lib/libidn.so.17"); else {}
if ( !is_file ( "/usr/local/lib/libintl.so.9") || !is_link ( "/usr/local/lib/libintl.so.9") ) symlink ( "/usr/local/lib/libintl.so.8","/usr/local/lib/libintl.so.9"); else {}



require_once ($config['dnsmasq']['rootfolder']."www/function.inc");
You can find path to startup script into System|Advanced|Command scripts
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1452
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: EXTENSION dhcp-server

#25

Post by ernie »

Dear All,
I am interested by this extension. Today, do I use the version of Bupban (download/file.php?id=2259) which is proposed in his post ? Or do I use the
fetch https://raw.github.com/alexey1234/nas4f ... install.sh method ?
I would be sure to have the right final version of this extension.
Thanks
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7542) embedded
NAS1: Xeon E3 1241@3.5GHz, 4HDD@2To/raidz2 (WD red), 3HDD@300Go/sas/raidz1 (Hitachi), 1SSD cache, Zlog on sas mirror
NAS2: G3220@3GHz, 3HDD@2To/raidz1 (Seagate), 1SSD cache, 1HDD@300Go/UFS
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, UPS,
NAS2: OBI (zrep (backup mode), themes)

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#26

Post by alexey123 »

I rewrite dnsmasq extension for 10.1 based Nas4Free and migrate to github

This is https://github.com/alexey1234/nas4free-dnsmasq extension home

Install procedure - some as thebrig

Code: Select all

fetch https://raw.github.com/alexey1234/nas4free-dnsmasq/master/dnsmasq_install.sh
then
sh dnsmasq_install.sh /path/to/extension/folder
/path/to/extension/folder - replace for valid path
Must be output
Image
Then over webgui need confirm instalation
Image

New on dnsmasq:
1. rc script, placed into /etc/rc.d folder - user can start and stop dnsmasq over command line

Code: Select all

/etc/rc.d/dnsmasq start 
/etc/rc.d/dnsmasq stop 
/etc/rc.d/dnsmasq restart 
2. Config file mamed /var/etc/dnsmasq.conf . It rebuild when execute command

Code: Select all

/etc/rc.d/dnsmasq start 
3. Simple update over config page - one-click on update button

Color diagnostic - If client table have green line, dnsmasq is running, if it have yellow line - we gave problem, dnsmasq not running
For example - my home configuration
Image

I wriye this extension for reason
give to work netboot for some PCs - My router don't know it
I like call devices by name - dnsmasq is nameserver for my local network
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1452
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: EXTENSION dhcp-server

#27

Post by ernie »

Hello

Does it work on Nayla 9.3 version ?
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7542) embedded
NAS1: Xeon E3 1241@3.5GHz, 4HDD@2To/raidz2 (WD red), 3HDD@300Go/sas/raidz1 (Hitachi), 1SSD cache, Zlog on sas mirror
NAS2: G3220@3GHz, 3HDD@2To/raidz1 (Seagate), 1SSD cache, 1HDD@300Go/UFS
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, UPS,
NAS2: OBI (zrep (backup mode), themes)

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: EXTENSION dhcp-server

#28

Post by alexey123 »

Hmm.
Sorry, I not check it, but must work. Php and sh scripts will work, but may be need replace bynary file
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1452
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: EXTENSION dhcp-server

#29

Post by ernie »

I will test and will tell you.
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7542) embedded
NAS1: Xeon E3 1241@3.5GHz, 4HDD@2To/raidz2 (WD red), 3HDD@300Go/sas/raidz1 (Hitachi), 1SSD cache, Zlog on sas mirror
NAS2: G3220@3GHz, 3HDD@2To/raidz1 (Seagate), 1SSD cache, 1HDD@300Go/UFS
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, UPS,
NAS2: OBI (zrep (backup mode), themes)

bgold
Starter
Starter
Posts: 41
Joined: 23 May 2015 08:42
Status: Offline

Re: EXTENSION dhcp-server

#30

Post by bgold »

Nice work, been waiting for something like this.

Any chance you can add the option to add different DNS servers to the reservation host entry?

Thanks,

Brian
XigmaNAS 12.0.0.4.6625
HP ML150 Gen9, Dual 2.4ghz, 256gb, 25TB Storage, 3-ZFS pools w/SSD cache&logs, SSD boot/data, SFP+

Post Reply

Return to “Extensions / Add-ons”