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

    DNS forwarder custom host file?

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 3 Posters 2.0k 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.
    • D
      DutchSamurai
      last edited by

      Hi all,

      I'm new to pfSense and so far I've set up my firewall, dynamic-dns and vpn server. All working fine and generally I think it's fairly easy to use. Still struggling to get decent traffic reporting but that is something for a different topic ;)

      I'm trying to implement some sort of ad blocking by using this guide http://thomasloughlin.com/pfsense-dnsmasq-advanced-setup/

      However, I'm on pfsense 2.2 and it seems the file locations have changed. I tried searching with the console but I cannot find the required config file. I tried achieving the in the resolver but the file format is different so I'd prefer using the forwarder as I'm lazy.

      I also checked out https://forum.pfsense.org/index.php?topic=86986.0 but the advanced option for pointing to a external host file (addn-hosts=/etc/extra/test) doesn't work for me.

      Does anybody know where I can find the necessary files? Alternatives achieving the same are also welcome. I did try using firewall aliases but the plain text (urls only) yoyo.org file gave a lot of errors when importing.

      Another thing I noticed is that the diagnostics file editor doesn't like a lot of text. A file lines are OK but anything more and it just hangs at saving. Maybe my VM has too little memory? only got 256mb now.

      Anyway any help or hints would be appreciated. I know the basics of networking but there is a lot I still have to learn.

      Thanks

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        What necessary files? You need to create them. Pointing to non-existent one of course "does not work"….

        1 Reply Last reply Reply Quote 0
        • D
          DutchSamurai
          last edited by

          I've created my own host file in /etc/extra but I assume I need to let the forwarder know where it needs to look for the host file so that means doing something in the GUI or adding a line to a config file.

          As I've said I cannot find the dnsmasq config file the guide I linked to is talking about. Adding addn-hosts=/etc/extra/test to the advanced settings doesn't seem to work either.

          1 Reply Last reply Reply Quote 0
          • D
            DutchSamurai
            last edited by

            Nobody knows where I can find the correct files?

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

              You can do the same with the Resolver (Unbound) using pfBlockerNG.

              See the following link:
              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
              • D
                doktornotor Banned
                last edited by

                @DutchSamurai:

                Nobody knows where I can find the correct files?

                You cannot find them, you need to create them yourself. As long as you keep "describing" your issues like "doesn't seem to work", good luck with troubleshooting. As noted above, switch to Unbound/pfBNG instead of reinventing wheels.

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