Securifi Community Forum

Securifi Products => Almond+ => Topic started by: tastewar1 on May 09, 2016, 10:01:45 pm

Title: DNS settings
Post by: tastewar1 on May 09, 2016, 10:01:45 pm
Is it possible to configure the Almond+ to send DHCP clients a different DNS server address? Currently, I have a Raspberry Pi running pi-hole as a DNS server, and that works well. The Almond+ is configured to use the raspi as DNS. But the logs that the pi-hole provides would be more useful if *all* the queries didn't come from the IP address of the router, and instead came from the individual clients.

I know that DHCP allows this; is it possible to configure Almond+/OpenWRT to do this? I couldn't find an appropriate setting in the Web UI...
Title: Re: DNS settings
Post by: grouter on May 09, 2016, 11:26:42 pm
I think the only option to do something like this in the web ui is to forward requests from the a+ to your pi. You'd also need to, on the pi, allow forwarding from the a+. Advanced > openwrt > network > DHCP and DNS > DNS forwardings

Here's something I ran across that does what you want, but not within the web interface.

From http://serverfault.com/questions/663364/how-to-serve-custom-dns-to-dhcp-clients-in-openwrt

DNS server adress corresponds to DHCP option 006. According to the OpenWRT Wiki your /etc/config/dhcp should look like

config 'dhcp' 'lan'
    ...
    list 'dhcp_option' '6,yourDNSIP'
Title: Re: DNS settings
Post by: tastewar1 on May 10, 2016, 07:48:04 am
Thanks. I had seen a couple of similar references to diddling around with the config file. Was hoping not to have to delve in there, but I guess I will!
Title: Re: DNS settings
Post by: tastewar1 on May 12, 2016, 08:01:06 am
A bit scary, but seems to have worked. One problem I had was that I had earlier added a firewall rule that was supposed to eliminate use of other DNS servers. Well, that rule seemed to have caused *NO* DNS queries to be successful after this change. Oops. Once I removed it, DNS started working again. I'll have to look into a somewhat different rule to either disallow outbound DNS queries from any IP other than my DNS, or disallow DNS to any external IP other than OpenDNS.
Title: Re: DNS settings
Post by: bebopblues on February 23, 2020, 05:16:46 am
A bit scary, but seems to have worked. One problem I had was that I had earlier added a firewall rule that was supposed to eliminate use of other DNS servers. Well, that rule seemed to have caused *NO* DNS queries to be successful after this change. Oops. Once I removed it, DNS started working again. I'll have to look into a somewhat different rule to either disallow outbound DNS queries from any IP other than my DNS, or disallow DNS to any external IP other than OpenDNS.
Sorry for digging up an old thread, but if you remember what you entered into the Almond+ and pi-hole console to get the DNS forwarding to work, please post it. Thanks.