DNS forwarder custom host file?

  • 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.


  • Banned

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

  • 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.

  • Nobody knows where I can find the correct files?

  • Moderator

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

    See the following link:

  • Banned


    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.

Log in to reply