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

Force DNS Resolver to Query OpenDNS for content filtering?

Scheduled Pinned Locked Moved DHCP and DNS
6 Posts 2 Posters 1.2k 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
    CCNewb
    last edited by Nov 25, 2018, 11:03 PM

    Can I force PfSense to use the DNS resolver for local hosts, then forward any external query to OpenDNS?

    Current Setup:
    PfSense (192.168.100.1) DHCP Server points DHCP clients to raspberry-pi PiHole DNS server (192.168.100.2).
    PiHole Up-Stream DNS points to OpenDNS server IPs
    Whats Working: Content filtering (kiddos cannot access porn sites)
    Whats not working: Local hostname DNS registration / lookup / PTR records, core DNS functionality IMO

    Desired Setup:
    PiHole Up-Stream DNS points to PfSense DNS Resolver. DNS Resolver "Enable Forwarding Mode" ticked. Everything ticked on DNS Resolver Options page. In System > General Setup > I have each WAN (dual WANs) Gateway pointed to a OpenDNS server. Disable DNS Forwarder and DNS Server Override are not ticked.

    Whats Not Working: OpenDNS Content filtering no longer works with the "Desired Setup", I'm guessing the DNS Resolver is resolving the fqdn itself instead of forwarding requests to OpenDNS.

    Here's an imgur gallery of the "desired setup" and pihole if anyone can spot any obvious config issues. DNS Forwarder is not enabled. I tried using that instead of the resolver but it didn't make a difference. I've rebooted the PfSense box and Pihole multiple times.

    https://imgur.com/a/8KFPgiv

    Thanks everyone

    1 Reply Last reply Reply Quote 0
    • C
      CCNewb
      last edited by CCNewb Nov 26, 2018, 12:28 AM Nov 26, 2018, 12:09 AM

      Here's how I just got it to work.

      Disable DNS Resolver
      Enable DNS Bind Server, set forwarder IPs - 208.67.222.222; 208.67.220.220;
      (the last ";" is important or you have to edit /cf/named/etc/namedb/named.conf manually to get service to start-- pfSense front end web devs need to regex the input field and people wont make this mistake)

      Something about DNS Resolver just wasn't working....
      Am I losing any important features going with the Bind flavor?

      1 Reply Last reply Reply Quote 0
      • G
        Gertjan
        last edited by Gertjan Nov 26, 2018, 10:21 AM Nov 26, 2018, 10:06 AM

        Hi,

        No need to get bind involved to have what you want.

        You could ask OpenDNS how to setup your pfSense https://support.opendns.com/hc/en-us/community/posts/220008547-How-to-configure-my-pfsense-firewall-with-OpenDNS-for-my-network ( the first link supplied is extraordinary !)
        Or, the even better : consult the pfSense documentation (which is this forum in this case, not the doc).

        Anyway. I have an account with OpenDNS, so I :

        1. Stopped using the Resolver which I use normally (for DNSSEC etc).
        2. Entered these on the System => General Set up page :

        0_1543226455297_1b1925aa-bbe5-4019-b608-ca41de14ab35-image.png

        1. Activated the Forwarder.

        And done. This URL https://support.opendns.com/hc/en-us/articles/227986567-How-to-test-for-successful-OpenDNS-configuration- confimed that my request went through OpenDNS.

        Pffff. Took me 60 seconds flat.

        Btw : Keep in mind that OpenDNS should know what your WAN is, because that's the way they know that your DNS requests came from you. If your IP-WAN isn't a static one (always the same) you should setup a Dynamic DNS : see their instructions.

        @ccnewb said in Force DNS Resolver to Query OpenDNS for content filtering?:

        Am I losing any important features going with the Bind flavor?

        Dono.
        Working with bind has a big advantage : you're working with the real thing that can handle all DNS related things. You name it, bind does it (as long as you are able to set it up). It's huge, you'll be studying for hours.
        I guess using bind just to instruct pfSense that it should OpenDNS as it's upstream DNS seems overkill to me.
        Keep in mind : keep it simple.

        Edit :
        Another proof that it works :
        0_1543227206344_fa3410ec-74d9-4cae-bd78-f3f6a5d0e96b-image.png

        edit 2 : another proof : it's 09h00, monday morning. My colleges are showing up.
        Took them less then a minute to find out that their favorite p0rn sites are not reachable anymore ..... I promised that I 'have a look at the situation" ^^

        edit again : I have somewhat this feeling that the Resolver (unbound) can also be used. remove all dnssec thingies, and activate the Forwarder mode - should do it. I'll try that later on.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • C
          CCNewb
          last edited by Nov 26, 2018, 9:13 PM

          Thanks for your reply.

          I'm not sure what's different today, but I disabled BIND server (I agree with you, sounds like overkill for what I'm doing) and I enabled DNS Forwarder with the settings below, and content filtering seems to work just fine. Strange as I remember trying this multiple times before and the porn sites would be accessible.

          alt text

          1 Reply Last reply Reply Quote 0
          • G
            Gertjan
            last edited by Nov 26, 2018, 9:19 PM

            You can test OpenDNS right away : just visit http://welcome.opendns.com and the page that shows up will confirm you're using OpenDSN services.

            A typical p0rn site can be tested with http://www.exampleadultsite.com

            A pishing site http://www.internetbadguys.com

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            C 1 Reply Last reply Nov 27, 2018, 2:33 AM Reply Quote 0
            • C
              CCNewb @Gertjan
              last edited by CCNewb Nov 27, 2018, 2:35 AM Nov 27, 2018, 2:33 AM

              @gertjan Thanks good to know about the example sites. Bookmarked. I loaded the real deal a good 50 times during testing. Content filtering working great now. Added a firewall rule to only allow port 53 DNS traffic through Pi-Hole. My Roku TVs decided to hardcode their own own 8.8.8.8 DNS setting , which now redirects to Pi-Hole. Too cool. I blackhole a ton of call home traffic across the network and it causes some devices to freak out with log writing.

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