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

    Can I nat dns queries to a internal pihole server?

    NAT
    3
    4
    810
    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.
    • D
      dabone
      last edited by

      I'm trying to redirect all dns queries from clients to a pihole server located on the same internal network.

      I've followed the guide from here, but subbed my pihole address instead of 127.0.0.1
      I've also tried with my domain controller dns.
      (This pfsense install is a test system, it will be in a separate network later.)
      Client has a fixed ip address with the dns servers defined as 8.8.8.8 and 1.1.1.1

      (pfsense is 192.168.0.44, pihole is 192.168.0.115)

      Redirecting all DNS Requests to pfSense

      When I have this nat rule in place, I get no dns. Any suggestions?

      D 1 Reply Last reply Reply Quote 0
      • D
        dabone @dabone
        last edited by

        Also, the pihole is on a different gateway, so its dns isn't getting filtered.

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

          Follow the guide exactly as is. Enable DNS Forwarder and disable Resolver. In General setup, add your pihole as the one and only DNS. Done.

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

            You can use forwarder mode in unbound as well, they don't have to switch over to forwarder.. I would say that would make sense if he was going to be forwarding to multiple pubic dns since it can query them all at the same time and use the first one to respond. But if he is just going to forward to pihole, then can just use resolver. But he then needs to point his pi-hole to something on the outside.

            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.7.2, 24.11

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