DNS Resolver



  • Hi guys

    in 2.2 the DNS forwarder is looking to be replaced and thus DNS Resolver has been added. It does require more testing than what I have and some others have done.
    Please could you test it and provide feedback.

    Thanks



  • Settings do not stick under "advanced".
    Attempted even checking random radio boxes and saving, same effect.



  • Getting this for awhile now:
    dhcpleases: Could not deliver signal HUP to process because its pidfile does not exist, No such process.



  • @m3usv0x:

    Settings do not stick under "advanced".
    Attempted even checking random radio boxes and saving, same effect.

    For what it is worth, I see the same issue.



  • Hi

    • Settings does not stick only on advanced, in general settings happens to.

    • I can't create a domain like mycustomdomain.com (10.0.0.50) and www.mycustomdomain.com (10.0.0.50) in Host Overrides, only one works. DNS Forward works OK

    • Can't delete networks when edit one access list.

    • I have a warning on Boot /etc/inc/unbund.inc file don't existe but /etc/inc/unbund.inc exist, i don't know if is a Caps problem Edited: The warning is not for file Unbund.inc is for  unbund.inc no Caps

    • Updating to 5 July from a a week ago seems having problems find some hosts, don't know why. I have to change to DNS Forward to solve this problems. One example i put the pfsense host name on Overrides and fail to resolve, some other works. The only change i make is using Vlans

    2.2-ALPHA (amd64) Full with RAM Disks enable.
    built on Sat Jul 05 16:00:36 CDT 2014
    FreeBSD 10.0-STABLE



  • Settings aren't sticking

    Can't resolve anything unless I disable forwarders

    Disabling forwarders breaks my ability to forward domains to certain servers



  • Just tried the latest build:

    2.2-ALPHA (amd64) 
    built on Wed Jul 16 09:13:49 CDT 2014 
    

    Looks better than before. I disabled forwarding mode since I want unbound to do the DNS lookups itself. It starts and does DNS lookups now. As soon as I set an outgoing interface it does not work anymore. I set it to WAN, which is the test hosts only WAN interface, configured to do DHCP/DHCPv6. Looking at the config file it seems that this interface cannot be found/parsed somehow:

    # Outgoing interfaces to be used
    outgoing-interface:
    
    


  • Can someone point me to the reasoning/discussion on why dnsmasq is being replaced?  I've always been happy with it.



  • It doesn't seem to be picking up the aliases set for a host - creates the original ok, but not the aliases… I tried creating 1-5 for a few of my hosts, none of them work.

    FreeBSD pfsense 10.0-STABLE FreeBSD 10.0-STABLE #18 0d8378f(HEAD)-dirty: Mon Jul 14 10:18:35 CDT 2014    root@pf22-amd64-snap:/usr/obj.amd64/usr/pfSensesrc/src/sys/pfSense_SMP.10  amd64

    [2.2-ALPHA][admin@pfsense]/etc/unbound(49): unbound -v
    [1405742091] unbound[56768:0] notice: Start of unbound 1.4.20.



  • @m3usv0x:

    Settings do not stick under "advanced".
    Attempted even checking random radio boxes and saving, same effect.

    This should be fixed.



  • @mais_um:

    Hi

    • Settings does not stick only on advanced, in general settings happens to.

    This should be fixed.

    @mais_um:

    Ok will look into this.

    @mais_um:

    • Can't delete networks when edit one access list.

    Please check latest snapshot.

    @mais_um:

    • I have a warning on Boot /etc/inc/unbund.inc file don't existe but /etc/inc/unbund.inc exist, i don't know if is a Caps problem Edited: The warning is not for file Unbund.inc is for  unbund.inc no Caps

    I dont see this error but check if it happens for you in latest snap.

    @mais_um:

    @mais_um:

    • Updating to 5 July from a a week ago seems having problems find some hosts, don't know why. I have to change to DNS Forward to solve this problems. One example i put the pfsense host name on Overrides and fail to resolve, some other works. The only change i make is using Vlans

    2.2-ALPHA (amd64) Full with RAM Disks enable.
    built on Sat Jul 05 16:00:36 CDT 2014
    FreeBSD 10.0-STABLE

    Hrmm.. once you make the change and it stops resolving then could please PM me your unbound config file so I can see if anything is missing?



  • @feld:

    Settings aren't sticking

    Can't resolve anything unless I disable forwarders

    Disabling forwarders breaks my ability to forward domains to certain servers

    Still the case in latest snap?



  • @stompro:

    Can someone point me to the reasoning/discussion on why dnsmasq is being replaced?  I've always been happy with it.

    Well Unbound is now in base of FreeBSD 10.X so it makes it (pfSense) easier to maintain.



  • Hi

    2.2-ALPHA (amd64)
    built on Tue Jul 22 01:18:23 CDT 2014 (Full)

    • Settings are sticking, i don't test if are working or not.

    • Can delete networks when edit one access list (what access list is for? been there or not is the same thing, some check box to only allow allowed lists? or i need one to reject all networks first?).

    • Hosts seems OK.

    • Host Override works but aliases don't.

    • Only the first domain works on Host Override. If i configure multiple domains to a IP or multiple IPs only the first one seems to work.

    • Not tested yet domain override. I'll.

    Edit: My DNS clients take the DNS from General Setup -> DNS Servers (the first-one) and not the pfsense IP. My DNS Servers in system information and in interface are 127.0.0.1 and those in General Setup -> DNS Servers (should have my ISP to from my pppoe connection).

    Edit2: For some reason My Ubuntu server 14.04 in VirtualBox doesn't resolve any host or domain said:

    "xxxxx@BoxHost:/etc$ nslookup
    > pfsense
    ;; reply from unexpected source: 10.0.30.1#53, expected 10.0.0.1#53"
    

    10.0.0.1 is Lan IP (vlan) and 10.0.30.1 is another Vlan where My ubuntu server network are.



  • @wagonza:

    @stompro:

    Can someone point me to the reasoning/discussion on why dnsmasq is being replaced?  I've always been happy with it.

    Well Unbound is now in base of FreeBSD 10.X so it makes it (pfSense) easier to maintain.

    and dnsmasq has some really poor failure modes.

    and … dense support is completely missing for dnsmasq



  • @mais_um:

    Hi

    2.2-ALPHA (amd64)
    built on Tue Jul 22 01:18:23 CDT 2014 (Full)

    • Settings are sticking, i don't test if are working or not.

    • Can delete networks when edit one access list (what access list is for? been there or not is the same thing, some check box to only allow allowed lists? or i need one to reject all networks first?).

    • Hosts seems OK.

    • Host Override works but aliases don't.

    • Only the first domain works on Host Override. If i configure multiple domains to a IP or multiple IPs only the first one seems to work.

    • Not tested yet domain override. I'll.

    Edit: My DNS clients take the DNS from General Setup -> DNS Servers (the first-one) and not the pfsense IP. My DNS Servers in system information and in interface are 127.0.0.1 and those in General Setup -> DNS Servers (should have my ISP to from my pppoe connection).

    Edit2: For some reason My Ubuntu server 14.04 in VirtualBox doesn't resolve any host or domain said:

    "xxxxx@BoxHost:/etc$ nslookup
    > pfsense
    ;; reply from unexpected source: 10.0.30.1#53, expected 10.0.0.1#53"
    

    10.0.0.1 is Lan IP (vlan) and 10.0.30.1 is another Vlan where My ubuntu server network are.

    I can second the above in bold. I cannot get pfSense to serve itself as DNS, instead it pushes ISP DNS.
    Am I missing something?



  • @m3usv0x:

    I can second the above in bold. I cannot get pfSense to serve itself as DNS, instead it pushes ISP DNS.
    Am I missing something?

    I'll third this… pfSense is not providing the router's IP address as the DNS server for clients to use when DNS Resolver is enabled. All works correctly when DNS Forwarder is used instead.



  • yes i noticed this also in 2.1.4 when doing some troubleshooting



  • Just to bump this: pfSense is not providing the router's IP address as the DNS server for clients to use when DNS Resolver is enabled. All works correctly when DNS Forwarder is used instead.

    I tried with and without Enable Forwarding Mode. I also made sure that the override box in General Settings is off.

    Also, slightly related, the dropdown options on the advanced settings page are all at the first option as default, while the legends/help texts underneath claim that default values are something else.



  • Another bump, but also something different…

    I recently changed back from ISP DHCPv6+PD to my HE tunnel, and in doing so I re-enabled the DHCPv6 server in pfSense. Anyway... after those changes were made, I disabled DNS Forwarder and enabled DNS Resolver. Pulled my network connection, reconnected it, and now my computer received my router's IPv6 address for DNS, but IPv4 DNS servers point to the DNS servers I've specified in the router.

    For reference, my DHCPv6/RA setting is Managed.



  • Upgraded from 2.1.5 to:

    2.2-BETA (i386)
    built on Fri Sep 19 23:33:28 CDT 2014

    Disabled DNS Forwarder and enabled DNS Resolver.  The service failed to start up with the following error:

     php-fpm[38680]: /services_unbound.php: The command '/usr/sbin/unbound -c /var/unbound/unbound.conf' returned exit code '1', the output was '[1411217151] unbound[40074:0] fatal error: user 'unbound' does not exist.'
    
    

    I decided to create an unbound user/group to see what would happen, but upon attempting to start it up again, I received this error:

    php-fpm[26599]: /services_unbound.php: The command '/usr/sbin/unbound -c /var/unbound/unbound.conf' returned exit code '1', the output was ''
    
    

    I haven't had a chance to troubleshoot further, but I'm happy to provide any other info.

    Thanks!
    -Mike


  • Administrator

    @emce:

    Upgraded from 2.1.5 to:

    2.2-BETA (i386)
    built on Fri Sep 19 23:33:28 CDT 2014

    Disabled DNS Forwarder and enabled DNS Resolver.  The service failed to start up with the following error:

     php-fpm[38680]: /services_unbound.php: The command '/usr/sbin/unbound -c /var/unbound/unbound.conf' returned exit code '1', the output was '[1411217151] unbound[40074:0] fatal error: user 'unbound' does not exist.'
    
    

    I decided to create an unbound user/group to see what would happen, but upon attempting to start it up again, I received this error:

    php-fpm[26599]: /services_unbound.php: The command '/usr/sbin/unbound -c /var/unbound/unbound.conf' returned exit code '1', the output was ''
    
    

    I haven't had a chance to troubleshoot further, but I'm happy to provide any other info.

    Thanks!
    -Mike

    I pushed an upgrade code to migrate unbound package configuration to 2.2 when it's installed, and also make sure unbound user is created during upgrade. It'll be available on next snapshots.



  • @Renato:

    I pushed an upgrade code to migrate unbound package configuration to 2.2 when it's installed, and also make sure unbound user is created during upgrade. It'll be available on next snapshots.

    Upgraded to:

    2.2-BETA (i386)
    built on Wed Sep 24 04:55:10 CDT 2014
    FreeBSD 10.1-PRERELEASE

    And everything is looking good so far.  Thanks!
    -Mike



  • @emce:

    Upgraded to:

    2.2-BETA (i386)
    built on Wed Sep 24 04:55:10 CDT 2014
    FreeBSD 10.1-PRERELEASE

    And everything is looking good so far.  Thanks!
    -Mike

    2.2-BETA (amd64)
    built on Wed Sep 24 04:53:53 CDT 2014 (nanobsd)

    I continue with some problems:

    • I have to put on "DHCP Server  -> DNS servers"  my localhost IP, otherwise clients don't pick local DNS server and if i don't have DNS servers in "System ->General", does not get any . "Do not use the DNS Forwarder as a DNS server for the firewall" are uncheck. DNS Forward work ok,

    • One more time, Aliases in  Host override don't work,

    • Can't redirect multiple custom domains to a local IP. Ex. mydomain.com and www.mydomain.com, only the top work the other get a non-authorirative sever to get IP if have any.

    Cya



  • First a little background and then what the problem is and why ….

    2.2-BETA (amd64)
    built on Fri Oct 17

    Behavior of Enabling Forwarding Mode

    Services: DNS Resolver

    Select: Enable Forwarding Mode

    This adds the following to /etc/unbound/unbound.conf

    # Forwarding
    forward-zone:
        name: "."
            forward-addr: 8.8.8.8
    

    The forwarding DNS server is read from what is configured in "System: General Setup - DNS servers"

    This works fine.  However, that is not the sever I want to forward to.

    What I want to accomplish

    I want to use unbound to forward to a DNSCrypt Proxy listening on 127.0.0.1 port 40.

    I am doing this today with DNS Forwarder (dnsmasq) as documented in:
    https://forum.pfsense.org/index.php?topic=78446.msg453441#msg453441

    Attempted configuration

    Since using the "Enable Forwarding Mode" checkbox picks the DNS servers in General Setup, I need a way to override that and use 127.0.0.1@40.

    So, I deselected "Enable Forwarding Mode" and in the Advanced box entered:

    forward-zone:
        name: "."
            forward-addr: 127.0.0.1@40
    

    That Advanced configuration shows in /conf/config.xml.  BUT, unbound never uses it and is not in forwarding mode.

    Since that is a valid unbound configuration , why is it being ignored when you enter it in the Advanced box?  Shouldn't these options be passed to unbound when it starts?



  • Hi

    Someone please :), correct host overrides? thanks.



  • The resolver is forwarding requests to my providers DNS instead of querying the root domain name servers. You can test this by going to https://www.dnsleaktest.com/

    How can I configure it not to do this?



  • @router_wang:

    The resolver is forwarding requests to my providers DNS instead of querying the root domain name servers. You can test this by going to https://www.dnsleaktest.com/

    How can I configure it not to do this?

    Go to System/General Setup-  DNS Servers…

    Uncheck- " Allow DNS server list to be overridden by DHCP/PPP on WAV"

    Check-  "Do not use the DNS Forwarder as a DNS server for the firewall"



  • @chpalmer:

    @router_wang:

    The resolver is forwarding requests to my providers DNS instead of querying the root domain name servers. You can test this by going to https://www.dnsleaktest.com/

    How can I configure it not to do this?

    Go to System/General Setup-  DNS Servers…

    Uncheck- " Allow DNS server list to be overridden by DHCP/PPP on WAV"

    Check-  "Do not use the DNS Forwarder as a DNS server for the firewall"

    Yes, I have it set like this and it still does it anyway.



  • I'm using CARP virtual IPs and run Unbound on "All" interfaces.
    If I query the CARP IP from a Linux box, I get this:

    root@none:~# dig @192.168.xxx.254 www.heise.de
    ;; reply from unexpected source: 192.168.xxx.5#53, expected 192.168.xxx.254#53
    ;; reply from unexpected source: 192.168.xxx.5#53, expected 192.168.xxx.254#53
    ;; reply from unexpected source: 192.168.xxx.5#53, expected 192.168.xxx.254#53
    

    Snapshot is AMD64 from today.



  • @router_wang:

    @chpalmer:

    @router_wang:

    The resolver is forwarding requests to my providers DNS instead of querying the root domain name servers. You can test this by going to https://www.dnsleaktest.com/

    How can I configure it not to do this?

    Go to System/General Setup-  DNS Servers…

    Uncheck- " Allow DNS server list to be overridden by DHCP/PPP on WAV"

    Check-  "Do not use the DNS Forwarder as a DNS server for the firewall"

    Yes, I have it set like this and it still does it anyway.

    Are you using dhcp? if yes, you have to put the ip from the interface you're using in dns servers so it can be assigned to leases.



  • After each update I've noticed unbound won't start on a reboot. I've got to go in and save the settings and then it will start. Here is what I see in the logs each time:

    
    Nov  1 18:22:07 firewall unbound: [80205:0] error: can't bind socket: Can't assign requested address
    Nov  1 18:22:07 firewall unbound: [80205:0] debug: failed address fe80::250:56ff:fe1a:1b1c port 42698
    
    

    I merely just update and reboot. Then to correct I simply go into the settings and hit SAVE and that lets it recover.



  • Are you using dhcp? if yes, you have to put the ip from the interface you're using in dns servers so it can be assigned to leases.

    This was a key point - thanks.



  • DNS Spoofabillity test: https://www.grc.com/dns/dns.htm

    DNS Nameserver Access Details
    External Ping: ignored (Nice, as it's preferable for it to be less visible.)
    External Query: ignored (This means the nameserver is more spoof resistant.)
    DNSSEC Security: supported (This server supports improved security standards.)
    –-> Alphabetic Case: mixed (Extra bits of entropy are present in these queries!)  <---
    Extra Anti-Spoofing: unknown (Unable to obtain server fingerprint.)

    I've added the options below into the unbound config on my pfsense v2.1.5 in order to get the extra bits of entropy for the alphabetic case test.

    
    use-caps-for-id: yes
    val-clean-additional: yes
    
    

    I wonder if these are available by default, or switchable settings in the new pfsense 2.2 builds?

    Quote on the alphabetic case test:

    Alphabetic Case:
    The DNS system is not sensitive to alphabetic case, so the domain “WWW.GRC.COM” is identical to “www.grc.com”. DNS is designed to ignore but preserve the alphabetic case used in queries and replies. This creates an opportunity for a DNS resolver to add additional unknown bits of “entropy” to its queries by randomly changing the case of any alphabetic characters in the queried domain name. When replies are received, only the valid replying nameserver that received the mixed-case query could know the proper case for its reply. No spoofing server would know. This would give a clever resolver another way to reject spoofed replies. We know of no nameservers that are deliberately mixing case in this way, but through this test we are helping you to keep your eye out for any.



  • Still not seeing host overrides work.

    
    ❯ dig doubleclick.net
    
    ; <<>> DiG 9.8.3-P1 <<>> doubleclick.net
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37689
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;doubleclick.net.		IN	A
    
    ;; ANSWER SECTION:
    doubleclick.net.	3600	IN	A	70.32.146.212
    
    ;; Query time: 105 msec
    ;; SERVER: 192.168.15.1#53(192.168.15.1)
    ;; WHEN: Sun Nov  9 14:00:46 2014
    ;; MSG SIZE  rcvd: 49
    
    




  • It works for me but, I have to send it to 0.0.0.0, not 127.0.0.1.



  • Hmmm - I'm on the latest beta, tried 0.0.0.0 and 127.0.0.1.  Still no joy.  Will look into this further tomorrow.



  • My bad.  I wasn't filling it out correctly - it works if you do it as I show in the attached.




  • Can I pass "include: /etc/unbound/local-blocking-data.conf" in the advanced field of the resolver? I want to block some domains.



  • Apparently the options in the advanced field are not parsed to the config file. Am I doing it wrong?