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

    Dnsmasq host override help

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 3 Posters 1.8k 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.
    • I Offline
      itamania
      last edited by

      I'm trying to setup dnsmasq host overrides and not sure what am I doing wrong. running on 2.2-RELEASE (i386)

      I have listed these DNS servers under system:General settings:

      
      8.8.8.8
      75.75.75.75
      75.75.76.76
      
      

      and unchecked the Allow DNS server list to be overridden by DHCP/PPP on WAN

      then checked all these under DNS Forwarder

      
      Enable DNS forwarder
      Register DHCP leases in DNS forwarder
      Register DHCP static mappings in DNS forwarder
      Resolve DHCP mappings first
      Query DNS servers sequentially
      Require domain
      Do not forward private reverse lookups
      
      Listen Port: (blank)
      Interface: ALL
      
      

      Then I added an host override Domain facebook.com -> 216.58.219.78
      restarted the service and renew local IP address.

      The rule didn't work and I'm able to access to facebook test.

      Under the system log (Status: System logs: Resolver) I can see entries related to dnsmasq

      Any ideas where I can further investigate what I'm doing wrong?

      EDIT: I should add that I've added a firewall rule as mentioned here https://doc.pfsense.org/index.php/Blocking_DNS_queries_to_external_resolvers

      1 Reply Last reply Reply Quote 0
      • KOMK Offline
        KOM
        last edited by

        I just tried it myself on 2.2-x64 and it works but I had to restart the browser.  I created a host override with just facebook.com with no host specified and an alias of www.

        1 Reply Last reply Reply Quote 0
        • I Offline
          itamania
          last edited by

          Thanks KOM. so after restarting the browser (silly me) it now works but only for my local network, I have few IP cameras and created overrides like so

          
          Host -> camdriveway
          Domain -> zebra (this is what I have set under system general for domain)
          IP Address -> 192.168.1.150
          Description -> Driveway IP Camera
          alias -> blank
          
          

          This will allow me to access the camera from any browser using camdriveway in address bar, and works fine now

          But the facebook test still not working.

          1 Reply Last reply Reply Quote 0
          • johnpozJ Offline
            johnpoz LAYER 8 Global Moderator
            last edited by

            why do people test with a browser for some as simple a dns query?

            From a cmd line use your fav tool.. nslookup, dig, drill or just ping - what does it resolve too for your fqdn query?

            Browsers can be using proxy, could be highjacked, use their own cache, etc..

            So your fqdn is camdriveway.zebra ?  not really of single label domains.  about zebra.lan or zebra.net, etc.  Single labels while they should be fine tend to have weirdness depending on OS, application, etc. etc.

            So from a cmdline do - see attached

            simpleoverridetest.png
            simpleoverridetest.png_thumb

            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 25.07.1 | Lab VMs 2.8.1, 25.07.1

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.