SOLVED: Change secondary DNS that DHCP hands out. - Resolved

mjdano
Posts: 5
Joined: Sun Jun 24, 2012 2:58 pm

SOLVED: Change secondary DNS that DHCP hands out. - Resolved

Postby mjdano » Sat Jun 22, 2013 8:11 am

I looked around and didn't see any way to edit what the secondary DNS server that the HDA hands out is. I would like to change this to openDNS server rather than the PC's getting the HDA as both the primary and secondary DNS. This would help me on my network if the HDA is down for any reason the internet will still work with out having to go and set static IP's on the computers.

Does anybody know what files need to be edited on the Ubuntu 12.04 version of the HDA to make this happen?
Last edited by mjdano on Sat Jun 22, 2013 8:18 pm, edited 1 time in total.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Change secondary DNS that DHCP hands out.

Postby bigfoot65 » Sat Jun 22, 2013 8:35 am

ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

mjdano
Posts: 5
Joined: Sun Jun 24, 2012 2:58 pm

Re: Change secondary DNS that DHCP hands out.

Postby mjdano » Sat Jun 22, 2013 2:26 pm

I dont want to change the DNS that my HDA is using. I want the HDA to give out my HDA as the primary DNS and Open DNS as the secondary DNS server for the local PC's.

As an example.

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : dpanther.name
Description . . . . . . . . . . . : Intel(R) 82566DM-2 Gigabit Network Connection
Physical Address. . . . . . . . . : 00-21-9B-87-20-7C
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.160.115(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Saturday, June 22, 2013 5:13:15 PM
Lease Expires . . . . . . . . . . : Saturday, June 22, 2013 9:13:20 PM
Default Gateway . . . . . . . . . : 192.168.160.1
DHCP Server . . . . . . . . . . . : 192.168.160.10
DNS Servers . . . . . . . . . . . : 192.168.160.10 <---- Leave this one as HDA
192.168.160.10 <---- Change this to OpenDNS instead of HDA
NetBIOS over Tcpip. . . . . . . . : Enabled

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Change secondary DNS that DHCP hands out.

Postby bigfoot65 » Sat Jun 22, 2013 2:34 pm

The only way to have clients get a secondary DNS from other than the HDA will require you set it manually on each. No way around it that I am aware.

Keep in mind if the HDA is down, there is no DHCP. Good chance the client will lose internet connectivity anyway.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

mjdano
Posts: 5
Joined: Sun Jun 24, 2012 2:58 pm

Re: Change secondary DNS that DHCP hands out.

Postby mjdano » Sat Jun 22, 2013 2:45 pm

where does the HDA get the DNS servers that it hands out for DHCP? I realize that if the HDA is down it will not hand out new DHCP but if the machines have an address already then they will still be able to get to the internet. The reason for the secondary DNS server is so that the network will continue to work if the primary is not working. I was hopeing that I would not have to set the DNS servers statically on the PC's as that defeats the purpose of DHCP, and it's a pain on Ipads to have half the address static and half dynamic.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Change secondary DNS that DHCP hands out.

Postby bigfoot65 » Sat Jun 22, 2013 2:53 pm

OpenDNS is what the HDA uses unless you change it. You may lose connectivity if the HDA is down. If the DHCP lease expires while it's down, there is nothing to provide one. I have had my HDA off for a short time and eventually I lose connection on my clients. Without another device to provide DHCP, it could be an issue.

The only way to do what you want is set it on each client. The HDA will always be listed as primary and secondary when it is handling DHCP. That is just the nature of the beast.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

mjdano
Posts: 5
Joined: Sun Jun 24, 2012 2:58 pm

Re: Change secondary DNS that DHCP hands out. - Resolved

Postby mjdano » Sat Jun 22, 2013 7:43 pm

Ok so i figured out how to do what I wanted and from my understanding of the code it should be doing it if an option is set in the database. I'm just not sure how to set the option.

In the hdactl file there is a option for $USE_OPENDNS_SECONDARY which then sets the secondary DNS server from the dhcp to an openDNS server ip. I foreced it to use this option and it works just like I wanted. My question now is without editing the hdactl file how do you set the $USE_OPENDNS_SECONDARY option in the database. I don't like editing the files that the HDA uses for building it's configs but i'm not sure where to look in the dashboard/database to turn this on.


EDIT:

Ok so I should have looked at the hdactl file a little closer the top of the file has this entry for changing the settings like I wanted.

# To enable DNS resolution secondary via OpenDNS,
# set the line below to 1
my $use_opendns_secondary = 0;

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Change secondary DNS that DHCP hands out. - Resolved

Postby bigfoot65 » Sat Jun 22, 2013 8:33 pm

Amazing. I did not know that option existed. Good find. There is nothing in the dashboard to set this, only manual as you have indicated.

Would you mind adding this to the wiki? Would be helpful for other users.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: SOLVED: Change secondary DNS that DHCP hands out. - Reso

Postby cpg » Sun Jun 23, 2013 2:35 pm

Hi, I added some details about this in the [wiki]Alternate secondary DNS[/wiki] wiki page. Also, in Amahi 6 there may be a bug where you cannot add this setting to /etc/hdactl.conf, though that was the intention.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Who is online

Users browsing this forum: No registered users and 5 guests