OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 17.1 Legacy Series »
  • Firewall not using DNS overrides?
« previous next »
  • Print
Pages: [1]

Author Topic: Firewall not using DNS overrides?  (Read 4320 times)

cryptochrome

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Firewall not using DNS overrides?
« on: March 21, 2017, 03:42:14 pm »
Hi,

I configured DNS Forwarder and added a few host overrides, which works great from any client using the firewall as a DNS server. However, it is not working from the firewall itself, e.g. if I do a nslookup from the firewall shell, it sends the request to the forwarders instead of resolving through the host overrides.

Am I missing something here?

Thanks
Logged

djGrrr

  • Full Member
  • ***
  • Posts: 112
  • Karma: 22
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #1 on: March 21, 2017, 03:45:35 pm »
Make sure that the "Do not use the DNS Forwarder/Resolver as a DNS server for the firewall" option under System > Settings > General is turned off.
Logged

cryptochrome

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #2 on: March 21, 2017, 05:19:01 pm »
Just checked, it's turned off (and was turned off). I even tried giving it 127.0.0.1 as a nameserver but no joy.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #3 on: March 21, 2017, 06:35:04 pm »
Hey,

Could be a bug, not sure. I will try to reproduce.


Cheers,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #4 on: March 21, 2017, 06:41:02 pm »
Works from here with a host override on the firewall for both DNS Forwarder and Resolver and the box appropriately unchecked. Checking the setting breaks resolution as expected.

What override are you using? What are you trying to resolve?


Cheers,
Franco
Logged

cryptochrome

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #5 on: March 21, 2017, 06:53:09 pm »
I simply added a host as override, like "host.xyz.it -> 10.10.10.1". When I do a nslookup from computers behind the firewall for that host, it resolves to the 10.10.10.1 address. If I do it from the firewall, I get the public IP for that host (we're running a split DNS setup here). The option you are referring to is unchecked. Do I need to have 127.0.0.1 as nameserver configured somewhere for this to work?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #6 on: March 21, 2017, 07:02:43 pm »
Do you have custom DNS servers in the general settings as well?
Logged

cryptochrome

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #7 on: March 21, 2017, 07:29:45 pm »
I tried both, with and without custom DNS servers. Neither seems to work. I do get DNS servers through DHCP (WAN link) and I have the option enabled to pass this through to my downstream DHCP clients.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #8 on: March 21, 2017, 08:08:57 pm »
also happens when you ping? dns resolver is the same outcome? did you set anything in the interface selection of the forwarder?
Logged

cryptochrome

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #9 on: March 21, 2017, 09:49:58 pm »
Yes, it also happens when I ping or use the host command. I have set to bind to LAN interface. I just changed it back to the default (all interfaces) but it makes no difference.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #10 on: March 24, 2017, 08:10:11 am »
That's odd. At least in the case of strict interface binding I can agree with the nature of your problem, but not if no interface is selected, that's where it works. Anything else we could try? What do you think causes this? Maybe there is a hint in the Services: DNS Tools: Log file.
Logged

cryptochrome

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Re: Firewall not using DNS overrides?
« Reply #11 on: March 24, 2017, 11:45:25 am »
I have no clue. The log file doesen't have anything that would hint at an issue. It basically just repeats these two lines over and over again:

Code: [Select]
Mar 24 10:02:50 dnsmasq[24990]: read /var/etc/dnsmasq-hosts - 13 addresses
Mar 24 10:02:57 dnsmasq[24990]: read /etc/hosts - 2 addresses

And occassionaly prints this:

Code: [Select]
Mar 24 11:41:23 dnsmasq[66225]: using nameserver 80.69.96.12#53
Mar 24 11:41:23 dnsmasq[66225]: using nameserver 81.210.129.4#53

Mar 24 11:41:23 dnsmasq[66225]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect no-inotify

Mar 24 11:41:23 dnsmasq[66225]: DNS service limited to local subnets


Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 17.1 Legacy Series »
  • Firewall not using DNS overrides?
 

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