block custom domains in pfblocker
-
hello
anybody can help me I have small custom domains that I need to block using pfblockerng, I don't want to use any list I just want to block some websites.
Best -
Using DNSBL in pfBlocker?
You can just create a custom feed and add a custom block list there.
Steve
-
can you please give me a guide how can I add my custom block list, I tried to search but i couldn't find it, there is a Custom Domain whitelist in DNSBL, and TLD Blacklist
Thanks for your help -
I do it like this:
You need to have 'Enable TLD' set in the main DNSBL tab to block all sub domains of domains listed there.
Steve
-
thanks
for your help -
@stephenw10 I had to provide a dummy file name that fails to load because it validates source and header fields (can’t be blank), but it still seems to load the custom domain list.
Thanks!
-
Hmm, interesting. I still have that setup exactly like that and it seems OK, no errors reported. Are you running the dev version of pfBlocker?
Steve
-
@stephenw10 what are the differences between pfBlocker and pfBlocker-dev?
-
All the new features are in pfBlocker-dev at this point.
Better to check/ask here: https://forum.netgate.com/category/62/pfblockerng
Steve
-
Just so you know, you can block domains in unbound directly as well.
In your custom box of unbound
server: local-zone: "logs.roku.com" redirect local-data: "logs.roku.com A 127.0.0.1"
This would return loopback for anything.logs.roku.com, so client not going anywhere.. You could point that to any ip you want..
If you just want to block say host.logs.roku.com you could do that with a simple host override in unbound as well..
This is easy if you only have a handful you want to block, etc. But could get a bit overwhelming if you say had hundreds you wanted to block.
-
@stephenw10 .....I'm running pfBlockerNG-dev 2.2.5_27 and I do not see this page to create "Custom Block List." Am I missing something? Really need to create a domain block list and have tried most of the suggestions here.
-
@stephenw10 Sorry....dashboard says I'm running 2.4.4 latest version
-
Hi Tom, just jumping in because I recently learned where the "Custom options" box is located in pfSense 2.4.4 p3. Look here: Services/DNS Resolver/General Settings/Display Custom Options.
You will find this near the bottom of the page when you scroll down. Be careful how you use this. Do some reading and ask more questions, or do it on a "sandbox router" like I have set up for learning.
Good luck!
Greg
-
@GregBinSD
Thanks Greg....I feel like I'm losing my mind....In my Display Custom Options box is this: "server:include: /var/unbound/pfb_dnsbl.*conf"
If I try to add a domain (facebook.com) to the option box (as illustrated in other posts), pfSense generates an error trying to save config.
pfb_dnsbl.conf appears to contain all of my blocks though they are each divided into two lines "local-zone" and "local-data".
I don't believe I could simply edit the file (too easy) as it appears to be generated.
Still stumped
-
Dude post up what your putting in the box... This is not rocket science... I showed you EXACTLY how to block something..
edit:
Here I just blocked anything.facebook.comFor any client on your network using pfsense for their dns.
-
If you want to do this through pfBlocker (non-dev version) as I showed above go to:
Firewall > pfBlockerNG > DNSBL > DNSBL-FeedsAdd a new feed configured as in my screenshot above. The Custom Blocklist field is there.
Steve
-
Folks I don't need the attitude here. I have spent hours reading/researching how to do this. With no firm consensus on the solution, I keep trying them all and then I come here.
So how does your response relate to my question of the contents of my Custom Options - "server:include: /var/unbound/pfb_dnsbl.*conf"?
Help or more attitude?
Do I add your lines to a "xyz.conf" file or just enter them in the custom box below whats there?
-
There are multiple ways to skin this cat... You can do it in pfblocker directly, you could do it in the custom option box for unbound. Or sure you could hand edit a conf file - but if you hand edit some conf unless your loading that extra conf you created into unbound via the option box and directly editing the normal unbound.conf then it would get overwritten.
edit: removed my remarks after reading them - they had too much attitude in them... And just don't feel like dealing with this sort of nonsense so early in the year.
Good luck!
-
@johnpoz
Thanks, John. I've been around this game for a LONG time and everytime I have to learn a new firewall, there always seems to be some head-banging that I have to go through.I agree that editing a conf file will not work as they will get overwritten. So I'm looking at using the custom option box. So first, the only custom option I find is under "DNS Resolver/General Settings" will lines suggested:
But that then produces this:
So perhaps I don't know where the "control box of unbound" is as was suggested earlier. Am I even in the right neighborhood?
Thanks for your patience.
-
Tom, try this:
server:
local-zone: "facebook.com" redirect
local-data: "facebook.com A 127.0.0.1"
include: /var/unbound/pfb_dnsbl.*conf