Page 1 of 2
Change DHCP settings on the HDA
Posted: Wed Jul 20, 2011 7:57 am
by jonathankonrad
I posted part of this question on a related thread here:
http://forums.amahi.org/viewtopic.php?f=8&t=2743
However, I would love to simply be able to change some of the settings of the DHCP server on the HDA. How do I do that? I would like to have it server out more DNS entries than just the one - the HDA itself. That way if the HDA is done, clients can still resolve Internet IPs and surf.
So where is the settings or how can I specify some of that? Thanks for any help.
Re: Change DHCP settings on the HDA
Posted: Fri Jul 22, 2011 4:42 am
by apastor
Log into your HDA and go to Settings > Server
Then disable DNS and DHCP.
But I heard things do not function as well when this is disabled. (Apps if i remember correctly)
For long time using Amahi as my DNS/DHCP was my only quirk as for the same reasons you have. But my ahami box has been solid so I havent had any concerns or issues.
But I do wish they did make it so you can have a full fuctioning HDA without using Amahi's DNS/DHCP services.
Re: Change DHCP settings on the HDA
Posted: Sat Aug 20, 2011 11:10 am
by jonathankonrad
I do know how to turn them off. However, the DHCP function is working. I only wish to add some settings. Is there a text file I can edit?
Re: Change DHCP settings on the HDA
Posted: Sat Aug 20, 2011 2:31 pm
by bigfoot65
Nope...not unless its something that Amahi does not control. What are you trying to do?
Re: Change DHCP settings on the HDA
Posted: Sat Aug 20, 2011 4:16 pm
by jonathankonrad
I noticed that when clients on the network get an IP address that only get the HDA as available DNS. I was hoping they could get a different secondary or tertiary DNS server too.
Re: Change DHCP settings on the HDA
Posted: Mon Sep 12, 2011 5:31 am
by nalleju

You need to add some functions to the Amahi deamon:
Login with Putty or somthing or use Webmin
1 add ,$DNS2 to lin 25: our ($DEVICE, $NETMASK_SIZE, $NET_START, $DYN_LO, $DYN_HI, $USE_OPENDNS_SECONDARY) shall end with , $DNS2)
Code: Select all
our ($DEVICE, $NETMASK_SIZE, $NET_START, $DYN_LO, $DYN_HI, $USE_OPENDNS_SECONDARY, $DNS2)
2 add line after my $use_opendns_secondary = 0;
3 change line 716 from:
printf $dhcpd "\toption domain-name-servers %s, %s;\n", $dns1, $dns2;
to this (not dns1 dns1 but dns1 dns2...
Code: Select all
printf $dhcpd "\toption domain-name-servers %s, %s;\n", $dns1, $dns2;
Now set this into the conf and add add sme featurs if you want:
- range of DHCP to be 100-149
- OpenDNS as secondary
Code: Select all
$DYN_LO = "100";
$DYN_HI = "149";
$DNS2 = "192.168.33.1";
$USE_OPENDNS_SECONDARY = 1
Take the new settings into Amahi by restarting the deamon:

Have fun
Re: Change DHCP settings on the HDA
Posted: Mon Sep 12, 2011 6:54 pm
by jonathankonrad
I tried all of this and my windows clients still only show DNS servers;
192.168.28.10
192.168.28.10
which is the internal IP of my Amahi server. Also, there was no /etc/hdactl.conf file until I created it, but there was an /usr/bin/dhactl file which I edited as you indicated. I also changed the "192.168.33.1" to "192.168.28.10". You did not say, but I assumed this address is the address for the hda server?
Any more tips?
Re: Change DHCP settings on the HDA
Posted: Wed Sep 14, 2011 4:56 pm
by nalleju
You need to add yhe things I described to the file /usr/bin/hdactl in the places indicated. You are writing a program with a programming language with strict syntax. All characters do meen something.
Yes the file will be written when you edit it.
1. See that you add the variable $DNS2, if not nothing will work, you see error messges
2. this is wher it reads the valus from the file /etc/hdactl.conf
(I guess $USE_OPENDNS_SECONDARY = 0 is better for you)
3. this is where it writes the file that is to be used bu the system
(you could write the second dns address in numbers too. "192.168.28.1").
4. Restart
Use short time when testing but put back to normal otherwise you will have problems wit popping music, web apges not opening due to timeout... (I test with 144, and run 14400)
If you need to run with fixed ip's 150-254 and use the GUI yuo should put the "100" and "149" in the /usr/bin/hdactl.
If not GUI tells you they are not open for static use.
I just reboted my machine yesterday (by misstake) and its still giving the 3 local DNS addresses we have.
Re: Change DHCP settings on the HDA
Posted: Tue Sep 20, 2011 2:48 pm
by jonathankonrad
Sorry. You lost me on this one. I did all the edits exactly as you mentioned. I understand programming syntax and how careful one must be. My comment about creating the file was not that edits would be written to a file on exit. Rather, there was no /etc/hdactl.conf to edit so I had to create the file. That had me concerned.
Anyway, the good news is I have no error messages and the box is still serving out DHCP and acting as DNS. It's also more stable so I'm not as worried about this.
I would still feel better if clients pulled more than one DNS address, but hey ... it's working.
Thanks for the tips, I just must be missing something.
Re: Change DHCP settings on the HDA
Posted: Wed Sep 21, 2011 7:06 pm
by bigfoot65
nalleju,
This could be useful for other Amahi users. Are you willing to submit a patch to the platform to include this functionality? I think it would be a welcome addition for many.