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

    Redirect DNS

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 4 Posters 1.9k 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.
    • C Offline
      cohomology
      last edited by

      Here is what I am trying to do:

      My pfsense router has address 192.168.1.1; I am running a pi-hole(BTW, very nice piece of software to block ads) at 192.168.1.3. I want to redirect all DNS requests to 192.168.1.3, regardless of the DNS setting a client has. I found a similar thread here

      https://forum.pfsense.org/index.php/topic,63399.msg342946.html

      However, what I found was that redirecting to an external address like OpenDNS or 127.0.0.1 works; but redirecting to 192.168.1.3 does not work. Any hints? Thanks!

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

        Is 192.168.1.3 responding to dns queries?

        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
        • C Offline
          cohomology
          last edited by

          Yes when I set 192.168.1.3 as my DNS server. But no when a query is redirected to it.

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

            what is it resolving.. does it have to go outbound your network.. I would assume you have created a loop where you redirect all 53 traffic to 192.168.1.3, and then it wants to go ask roots or authoritative, and your just redirecting the dns traffic back to itself.

            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
            • DerelictD Offline
              Derelict LAYER 8 Netgate
              last edited by

              Doing this stuff same-subnet doesn't work very well. If you were to put the pi-hole on a different interface/subnet you would just port forward to it on LAN.

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply Reply Quote 0
              • BBcan177B Offline
                BBcan177 Moderator
                last edited by

                @cohomology:

                I am running a pi-hole(BTW, very nice piece of software to block ads)

                You can do this and more with the pfBlockerNG package:
                https://forum.pfsense.org/index.php?topic=102470.0

                "Experience is something you don't get until just after you need it."

                Website: http://pfBlockerNG.com
                Twitter: @BBcan177  #pfBlockerNG
                Reddit: https://www.reddit.com/r/pfBlockerNG/new/

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