OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« previous next »
  • Print
Pages: 1 [2]

Author Topic: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working  (Read 12542 times)

xofer

  • Newbie
  • *
  • Posts: 42
  • Karma: 2
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #15 on: December 08, 2016, 06:54:32 pm »
Quote from: franco on December 08, 2016, 08:15:01 am
Not my most favourite solution, but more reports came up. Run this from the console and restart/reboot:

# opnsense-patch cd6cdba1b

https://github.com/opnsense/core/commit/cd6cdba1b


Cheers,
Franco
Got hit by this now. Upgraded and none of the dns overrides work.

dnsmasq-hosts is readable:
-rw-r--r--  1 root  wheel  475 Dec  8 17:41 /var/etc/dnsmasq-hosts

Tried the patch above, but still nothing.

Its as if dnsmasq does not load /var/etc/dnsmasq-hosts at all. At the same time it DOES read /etc/hosts (and logs this):
Dec  8 17:41:35 mono dnsmasq[89726]: read /etc/hosts - 2 addresses

So as a workaround i just appended the contents of /var/etc/dnsmasq-hosts to /etc/hosts and restarted dnsmasq so my users will not kill me in the morning...
Logged

sidney_v

  • Newbie
  • *
  • Posts: 16
  • Karma: 2
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #16 on: December 08, 2016, 07:16:23 pm »
"Glad" to see that I'm not alone...

Another GUI solution that works for me, switch between DNS Forwarder to DNS Resolver which also allows host & domain overrides.

xofer : you just copy /var/etc/dnsmasq-hosts to /etc/hosts ? do you have an example of /var/etc/dnsmasq-hosts ?

Thanks for your help
Logged

cdburgess75

  • Newbie
  • *
  • Posts: 46
  • Karma: 8
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #17 on: December 08, 2016, 09:34:05 pm »
DNS Resolver solved for me too
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #18 on: December 08, 2016, 11:29:49 pm »
Ok, so it seems people don't use "regdhcp" and thus don't have overrides or static leases. I've changed a piece of code now that wasn't changed before, but seemed to rely on a hardcoded /etc/hosts usage, meaning the actual include statement was defunct all along. Let's try this patch...

https://github.com/opnsense/core/commit/f31e5560

# opnsense-patch f31e5560


Cheers,
Franco
Logged

sidney_v

  • Newbie
  • *
  • Posts: 16
  • Karma: 2
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #19 on: December 09, 2016, 08:20:21 am »
I've patched and it works great  ;)
Many thanks Franco !

Logged

xofer

  • Newbie
  • *
  • Posts: 42
  • Karma: 2
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #20 on: December 09, 2016, 10:25:04 am »
Quote from: sidney_v on December 08, 2016, 07:16:23 pm
xofer : you just copy /var/etc/dnsmasq-hosts to /etc/hosts ? do you have an example of /var/etc/dnsmasq-hosts ?
No, i appended it.
Basically what i did:
cat /var/etc/dnsmasq-hosts >> /etc/hosts
and then restarted dnsmasq

They are the same format so it worked. Be aware that it is strictly a workaround, not a solution! Web configurator still writes things to /var/etc/dnsmasq-hosts and these changes will not reach /etc/hosts and also /etc/hosts might be overwritten at some other point (I don't really know when this is created - mayb on boot, maybe if you change your nameserver or host name).

Haven't had a chance to test patch f31e5560 - and cannot test at the moment (70 people using the router right now...). But if it solves the problem of dnsmasq loading the correct file this is by far better than mucking about with the files. I just did a quick hack to not get phonecalls in the morning.
Logged

sidney_v

  • Newbie
  • *
  • Posts: 16
  • Karma: 2
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #21 on: December 09, 2016, 12:04:07 pm »
Noticed, I won't use it because last patch works.
Thank you xofer ;)
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #22 on: December 09, 2016, 02:38:15 pm »
Thanks for confirming. Both patches will be included in 16.7.11. :)
Logged

cdburgess75

  • Newbie
  • *
  • Posts: 46
  • Karma: 8
    • View Profile
Re: [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
« Reply #23 on: December 09, 2016, 03:28:01 pm »
Awesome!  Thank you.
Logged

  • Print
Pages: 1 [2]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • [SOLVED] 16.7.10: DNS Forwarder host overrides have stopped working
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2