• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

DNS Resolver Host Override not working in Windows

Scheduled Pinned Locked Moved DHCP and DNS
28 Posts 3 Posters 2.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    johnpoz LAYER 8 Global Moderator
    last edited by johnpoz Apr 30, 2019, 6:39 PM Apr 30, 2019, 6:36 PM

    If you were asking pfsense for its own name which is what the 192.168.100.2 is then it would be answering.

    Yes a VPN policy route rule could keep it from talking to pfsense - please post up your lan rules, do you have any floating rules. Your not doing any port forwards on your lan interface are you?

    Logging in unbound will show us that it actually got asked... For example

    Apr 30 13:34:05 	unbound 	42007:1 	info: 192.168.9.100 aaa.testdomain.com. A IN NOERROR 0.000000 1 63
    Apr 30 13:34:05 	unbound 	42007:1 	info: 192.168.9.100 aaa.testdomain.com. A IN 
    

    here is where I asked for aaa.testdomain.com who asked 192.168.9.100, and that it was answered..

    My guess is your not asking unbound on pfsense at all, or its totally borked. Did you mess with the ACLs?

    My guess is your redirecting to something other than pfsense for dns.

    BTW, I am new to pfsense, and I am not a network guru...

    hehe - don't worry that pretty clear from the get go ;) hehehehe

    An intelligent man is sometimes forced to be drunk to spend time with his fools
    If you get confused: Listen to the Music Play
    Please don't Chat/PM me for help, unless mod related
    SG-4860 24.11 | Lab VMs 2.8, 24.11

    1 Reply Last reply Reply Quote 0
    • S
      shawn8888
      last edited by shawn8888 Apr 30, 2019, 7:01 PM Apr 30, 2019, 6:57 PM

      Firewall Floating rules is empty.
      How do I post my lan rules?
      NAT/Port Forwarding:
      YES! I do a lot NAT to route the traffic on WAN, but nothing on LAN interface, and nothing about 53 port to mess up the DNS.

      The logs at "Status/System Logs/System/DNS Resolver" are massive but doesn't show anything when do nslookup in windows.

      Not sure what ACLs is. Guess I am not using it.

      Also, I can browse Internet on this Windows box without any problems. So some DNS must be working...

      1 Reply Last reply Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator
        last edited by johnpoz Apr 30, 2019, 7:06 PM Apr 30, 2019, 7:03 PM

        @shawn8888 said in DNS Resolver Host Override not working in Windows:

        How do I post my lan rules?

        Simple screenshot works best..
        lanrules.png

        So are you logs over flowing? Turn the logging down back to 1 and just leave in my

        server:
        log-queries: yes
        log-replies: yes
        

        In the custom option box.. you should then see the queries your clients are asking for... If your NOT... then unbound is not being asked - for whatever reason that is... pfsense is no actually 192.168.100.2 - there is a different 192.168.100.2 on your network? You have some rule forcing dns out some other path, etc. etc.

        But if unbound doesn't actually get asked, then its not possible for it to return your overrides.

        So some DNS must be working...

        Doesn't have to be pfsense, could be proxy your using as well..

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • S
          shawn8888
          last edited by Apr 30, 2019, 7:30 PM

          OK, Here is the LAN rules:
          LAN.Rules.png

          DNS Resolver -> Display Custom Options
          I input the code below as you requested:

          server:
          log-queries: yes
          log-replies: yes
          

          So I went to pfSense Diagnostics -> dns lookup
          And I got this in my log:

          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 . NS IN
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 . NS IN NOERROR 0.000000 1 228
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com. A IN
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com. A IN NOERROR 0.000000 1 50
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com. AAAA IN
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com. AAAA IN NOERROR 0.000000 1 34
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com.phub.net.cable.rogers.com. AAAA IN
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com.phub.net.cable.rogers.com. AAAA IN NXDOMAIN 0.000000 1 121
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com. CNAME IN
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com. CNAME IN NOERROR 0.000000 1 34
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com.phub.net.cable.rogers.com. CNAME IN
          Apr 30 15:22:45 	unbound 	83793:0 	info: 127.0.0.1 www.facebook.com.phub.net.cable.rogers.com. CNAME IN NXDOMAIN 0.000000 1 121 
          

          However, when I do nslookup in Windows, I got nothing!

          But I can ping 192.168.100.2.

          c:\>ping 192.168.100.2
          
          Pinging 192.168.100.2 with 32 bytes of data:
          Reply from 192.168.100.2: bytes=32 time<1ms TTL=64
          Reply from 192.168.100.2: bytes=32 time<1ms TTL=64
          Reply from 192.168.100.2: bytes=32 time<1ms TTL=64
          Reply from 192.168.100.2: bytes=32 time<1ms TTL=64
          
          Ping statistics for 192.168.100.2:
              Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
          Approximate round trip times in milli-seconds:
              Minimum = 0ms, Maximum = 0ms, Average = 0ms
          
          

          Any other ideas?

          1 Reply Last reply Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator
            last edited by johnpoz Apr 30, 2019, 7:38 PM Apr 30, 2019, 7:36 PM

            well if unbound is not showing you that it got asked, then it didn't get asked.

            How exactly is this box your doing the queries from connected to pfsense that is on 192.168.100.2?

            Look in your windows arp table on windows - the mac is pfsense mac?

            example

            $ arp -a
            
            Interface: 192.168.9.100 --- 0x10
              Internet Address      Physical Address      Type
              192.168.9.3           00-08-a2-0c-e6-24     dynamic
              192.168.9.10          00-11-32-7b-29-7d     dynamic
              192.168.9.11          00-11-32-7b-29-7e     dynamic
              192.168.9.65          02-11-32-29-00-3b     dynamic
              192.168.9.99          70-6e-6d-f3-11-93     dynamic
              192.168.9.101         00-13-3b-2f-67-63     dynamic
              192.168.9.201         00-13-3b-2f-67-63     dynamic
              192.168.9.206         00-21-70-7b-a9-a7     dynamic
              192.168.9.253         00-08-a2-0c-e6-24     dynamic
            

            My pfsense is that .253 -- and that is its mac..

            look on your status interfaces page

            LAN Interface (lan, igb0)
            Status     up
            MAC Address     00:08:a2:0c:e6:24 - ADI Engineering
            IPv4 Address     192.168.9.253
            Subnet mask IPv4     255.255.255.0
            

            If that shows valid - you sure yoru box is not running something that is hijacking your dns queries..

            Run a sniff on your box when you dns query.. Wireshark is free and easy to use - install it on your windows machine... Do some nslookups like you were doing and then post up the pcap so we can take a look..

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • S
              shawn8888
              last edited by Apr 30, 2019, 8:00 PM

              Here is the arp. I have installed vmware workstation, so there are some v-NICs

              c:\>arp -a
              
              Interface: 192.168.193.1 --- 0x4
                Internet Address      Physical Address      Type
                192.168.193.254       00-50-56-f8-2e-d8     dynamic
                192.168.193.255       ff-ff-ff-ff-ff-ff     static
                224.0.0.2             01-00-5e-00-00-02     static
                224.0.0.22            01-00-5e-00-00-16     static
                224.0.0.251           01-00-5e-00-00-fb     static
                224.0.0.252           01-00-5e-00-00-fc     static
                230.0.0.1             01-00-5e-00-00-01     static
                234.48.35.103         01-00-5e-30-23-67     static
                239.192.152.143       01-00-5e-40-98-8f     static
                239.255.255.250       01-00-5e-7f-ff-fa     static
                255.255.255.255       ff-ff-ff-ff-ff-ff     static
              
              Interface: 192.168.100.100 --- 0x7
                Internet Address      Physical Address      Type
                192.168.100.1         c0-c1-c0-7d-dd-22     dynamic
                192.168.100.2         00-50-56-9a-31-cd     dynamic
                192.168.100.3         94-0c-6d-1b-08-8e     dynamic
                192.168.100.52        a4-e4-b8-6c-55-b4     dynamic
                192.168.100.103       74-d4-35-07-1f-b5     dynamic
                192.168.100.140       00-0c-29-a9-96-19     dynamic
                192.168.100.150       18-03-73-cf-7e-1e     dynamic
                192.168.100.151       00-0c-29-13-e6-79     dynamic
                192.168.100.155       00-11-32-2c-a6-03     dynamic
                192.168.100.190       00-0c-29-82-d9-11     dynamic
                192.168.100.255       ff-ff-ff-ff-ff-ff     static
                224.0.0.2             01-00-5e-00-00-02     static
                224.0.0.22            01-00-5e-00-00-16     static
                224.0.0.251           01-00-5e-00-00-fb     static
                224.0.0.252           01-00-5e-00-00-fc     static
                230.0.0.1             01-00-5e-00-00-01     static
                234.48.35.103         01-00-5e-30-23-67     static
                239.192.152.143       01-00-5e-40-98-8f     static
                239.255.255.250       01-00-5e-7f-ff-fa     static
                255.255.255.255       ff-ff-ff-ff-ff-ff     static
              
              Interface: 169.254.54.84 --- 0x12
                Internet Address      Physical Address      Type
                169.254.255.255       ff-ff-ff-ff-ff-ff     static
                224.0.0.2             01-00-5e-00-00-02     static
                224.0.0.22            01-00-5e-00-00-16     static
                224.0.0.251           01-00-5e-00-00-fb     static
                224.0.0.252           01-00-5e-00-00-fc     static
                230.0.0.1             01-00-5e-00-00-01     static
                234.48.35.103         01-00-5e-30-23-67     static
                239.192.152.143       01-00-5e-40-98-8f     static
                239.255.255.250       01-00-5e-7f-ff-fa     static
                255.255.255.255       ff-ff-ff-ff-ff-ff     static
              
              c:\>
              

              My pfsense runs on a ESXi host as a VM. And the MAC is 00-50-56-9a-31-cd, which seems correct.

              LAN.Mac.png

              I have never tried Wireshark before and I will post the log as soon as I can.

              1 Reply Last reply Reply Quote 0
              • S
                shawn8888
                last edited by shawn8888 May 1, 2019, 12:37 AM May 1, 2019, 12:27 AM

                Here is some log from Wireshark when I did a

                c:\>nslookup www.facebook.com
                Server:  UnKnown
                Address:  192.168.100.2
                
                Non-authoritative answer:
                Name:    star-mini.c10r.facebook.com
                Addresses:  2a03:2880:f105:83:face:b00c:0:25de
                          157.240.12.35
                Aliases:  www.facebook.com
                
                

                mydns.zip

                From the log, I can read that my Windows (100.100) DID talk to pfsense (100.2), but not handled by unbound.

                One more thing to mention, I did install BIND for some testing before, but it is disabled, same with DNS forwarder. Only DNS Resolver is enabled right now.

                1 Reply Last reply Reply Quote 0
                • K
                  KOM
                  last edited by May 1, 2019, 12:44 AM

                  OK, you're definitely talking to pfsense for DNS. You queried it for www.facebook.com and it returned a result for both IPv4 and IPv6. Did you add the host override for www.facebook.com?

                  S 1 Reply Last reply May 1, 2019, 1:44 AM Reply Quote 0
                  • S
                    shawn8888 @KOM
                    last edited by shawn8888 May 1, 2019, 1:45 AM May 1, 2019, 1:44 AM

                    @KOM
                    Yes!
                    dns1.png

                    And for testing and fun, I disabled DNS resolver and run nslookup in Windows, and still able to resolve. Does that make any sense?

                    c:\>ipconfig /flushdns
                    
                    Windows IP Configuration
                    
                    Successfully flushed the DNS Resolver Cache.
                    
                    c:\>nslookup www.facebook.com
                    Server:  UnKnown
                    Address:  192.168.100.2
                    
                    Non-authoritative answer:
                    Name:    star-mini.c10r.facebook.com
                    Addresses:  2a03:2880:f10e:83:face:b00c:0:25de
                              157.240.14.35
                    Aliases:  www.facebook.com
                    
                    1 Reply Last reply Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator
                      last edited by johnpoz May 1, 2019, 2:23 AM May 1, 2019, 2:22 AM

                      So you have something else listening on 53 on pfsense then and not unbound..

                      lets see what is listening on 53

                      [2.4.4-RELEASE][admin@sg4860.local.lan]/: sockstat | grep :53
                      unbound  unbound    42007 3  udp4   192.168.3.253:53      *:*
                      unbound  unbound    42007 4  tcp4   192.168.3.253:53      *:*
                      unbound  unbound    42007 5  udp6   2001:470:snipped:3::253:53 *:*
                      unbound  unbound    42007 6  tcp6   2001:470:snipped:3::253:53 *:*
                      unbound  unbound    42007 7  udp4   192.168.9.253:53      *:*
                      unbound  unbound    42007 8  tcp4   192.168.9.253:53      *:*
                      unbound  unbound    42007 9  udp4   192.168.2.253:53      *:*
                      unbound  unbound    42007 10 tcp4   192.168.2.253:53      *:*
                      unbound  unbound    42007 11 udp4   192.168.6.253:53      *:*
                      unbound  unbound    42007 14 tcp4   192.168.6.253:53      *:*
                      unbound  unbound    42007 15 udp4   192.168.4.253:53      *:*
                      unbound  unbound    42007 16 tcp4   192.168.4.253:53      *:*
                      unbound  unbound    42007 17 udp4   192.168.7.253:53      *:*
                      unbound  unbound    42007 18 tcp4   192.168.7.253:53      *:*
                      unbound  unbound    42007 19 udp4   127.0.0.1:53          *:*
                      unbound  unbound    42007 20 tcp4   127.0.0.1:53          *:*
                      unbound  unbound    42007 21 udp6   ::1:53                *:*
                      unbound  unbound    42007 22 tcp6   ::1:53                *:*
                      [2.4.4-RELEASE][admin@sg4860.local.lan]/: 
                      

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      S 1 Reply Last reply May 1, 2019, 2:28 AM Reply Quote 0
                      • S
                        shawn8888 @johnpoz
                        last edited by shawn8888 May 1, 2019, 2:31 AM May 1, 2019, 2:28 AM

                        @johnpoz said in DNS Resolver Host Override not working in Windows:

                        sockstat | grep :53

                        You are right. seems BIND is running.
                        dns2.png

                        But I checked the settings and it's disabled.
                        dns3.png

                        And what is this "named"???

                        dns4.png

                        1 Reply Last reply Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator
                          last edited by May 1, 2019, 2:33 AM

                          named is BIND

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • S
                            shawn8888
                            last edited by shawn8888 May 1, 2019, 2:46 AM May 1, 2019, 2:45 AM

                            Thank you so much, johnpoz!

                            I manually stopped the service at Status/Services screen. And this is what I got:

                            c:\>nslookup www.facebook.com
                            Server:  pfSense.mydomain.com
                            Address:  192.168.100.2
                            
                            Name:    www.facebook.com
                            Address:  192.168.100.201
                            
                            
                            c:\>nslookup 192.168.100.201
                            Server:  pfSense.mydomain.com
                            Address:  192.168.100.2
                            
                            Name:    www.facebook.com
                            Address:  192.168.100.201
                            
                            

                            Still have questions though:

                            1. As the screenshot shows, BIND is NOT enabled. How did this service get started?

                            2. I haven't touched BIND for a long time. But I did restart pfsense for testing, which means the named service get auto started when reboot. How can I stop it?

                            1 Reply Last reply Reply Quote 0
                            • J
                              johnpoz LAYER 8 Global Moderator
                              last edited by May 1, 2019, 2:46 AM

                              No idea... Seems like you config is borked.. Export your config and look at the xml.. If not enable it shouldn't be starting - unless you manually did something like installed bind on your own vs packages, etc.

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.8, 24.11

                              S 1 Reply Last reply May 1, 2019, 2:48 AM Reply Quote 0
                              • S
                                shawn8888 @johnpoz
                                last edited by shawn8888 May 1, 2019, 2:50 AM May 1, 2019, 2:48 AM

                                @johnpoz said in DNS Resolver Host Override not working in Windows:

                                No idea... Seems like you config is borked.. Export your config and look at the xml.. If not enable it shouldn't be starting - unless you manually did something like installed bind on your own vs packages, etc.

                                I installed BIND from package. I guess I will have to uninstall it later.
                                Thank you again for your help! You are amazing!

                                1 Reply Last reply Reply Quote 0
                                • J
                                  johnpoz LAYER 8 Global Moderator
                                  last edited by johnpoz May 1, 2019, 2:51 AM May 1, 2019, 2:49 AM

                                  Did you maybe click on the service and start it that way? I have the package installed because time need to play with it to help users.

                                  It doesn't auto start itself..

                                  Learned one thing for sure - check earlier what is actually run if other users have sim issue ;) Would of solved your problem like in step one vs just trusting that all you had running was unbound.

                                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                                  If you get confused: Listen to the Music Play
                                  Please don't Chat/PM me for help, unless mod related
                                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                                  S 1 Reply Last reply May 1, 2019, 2:53 AM Reply Quote 0
                                  • S
                                    shawn8888 @johnpoz
                                    last edited by May 1, 2019, 2:53 AM

                                    @johnpoz
                                    No I didn't start the service manually.
                                    Very weird, isn't it? I would think only one service can be started on one port, 53. Maybe it's a bug of pfsense? LOL

                                    One last question:
                                    DNS forwarder, DNS resolver and BIND all do the same thing and only one should be enabled, correct?

                                    Is DNS resolver the best in your opinion?

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      johnpoz LAYER 8 Global Moderator
                                      last edited by johnpoz May 1, 2019, 3:00 AM May 1, 2019, 2:55 AM

                                      No its not a bug.. look at your bindings.. Your not bound to the same things.

                                      Bind is the king of dns... But you do not need it on pfsense, unbound is fine... I have been managing dns for years and years.. Since back in the bind 4 days. I just use unbound... its all you need for a home setup.

                                      its got pretty much any of the features you could possible need.. Now if wanted to run an authoritative ns, or needed slave ns then I would run bind.

                                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                                      If you get confused: Listen to the Music Play
                                      Please don't Chat/PM me for help, unless mod related
                                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                                      1 Reply Last reply Reply Quote 1
                                      • K
                                        KOM
                                        last edited by May 1, 2019, 2:32 PM

                                        @shawn8888 said in DNS Resolver Host Override not working in Windows:

                                        I installed BIND from package.

                                        This would have been a good nugget to know right from the start. At least it's working now.

                                        1 Reply Last reply Reply Quote 1
                                        28 out of 28
                                        • First post
                                          28/28
                                          Last post
                                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                          This community forum collects and processes your personal information.
                                          consent.not_received