pfBlockerNG not logging anything by default?
-
hey forum. maybe someone can help me with pfBlocker. I have this nice overview on pfsense mainpage but it logs nothing.
I found a related thread that never got resolved however https://forum.netgate.com/topic/175045/pfblockerng-not-logging-everything
Is this normal behaviour? I am using the default out of the box settings here.When doing a nslookup of a blocked domain I seem to be getting the correct response.
nslookup c.bing.com
Server: 127.0.0.53
Address: 127.0.0.53#53Non-authoritative answer:
Name: c.bing.com
Address: 10.10.10.1But I don't see anything logged in the main tab. Do I need to change something in this setting here:
Global Logging/Blocking Mode
By default it is set to "No Global Mode"
Under alerts I see my nslookups but it only shows "unknown" and not the actual website. I also expect more than just this to show up here when browsing the web. What do i need to change to get this to resolve properly? I have searched already and couldn't find a good answer. I am using Unbound btw. and this under general setup:
-
@rasputinthegreatest said in pfBlockerNG not logging anything by default?:
By default it is set to "No Global Mode"
That means you've selected (default, probably) :
Here : Firewall > pfBlockerNG > DNSBLso, for every DNSBL feed you use, pfBlockerNG will use the seclted log mode :
You didn't show what mode you actually selected, but I'll bet it is (pretty worthless) DNSBL Webserver/VIP" mode, as I saw that a request for a blocked host name (your example c.bing.com) pfBlockerNG resturn 10.10.10.1 which is the DNSBL web server IP.
The unknown indication :
This means that, while "c.bing.com" was found in the 'main' DNSBL list, pfBlockerNG doesn't know (anymore) from which DNSBL list this host name "c.bing.com" came from.You've tried this :
Firewall > pfBlockerNG > Update and select "Reload" & "All" ? -
@Gertjan Unfortunately I have set it exactly like in your screenshots. The default was DNSBL webserver and I changed it to Null Block like in your screenshot. All it does is return 0.0.0.0 in nslookup. But even if I try different domains they don't get logged anymore in alerts like the first time I tried it.
I also did a "Update" and "Reload". I haven't tried the "Cron" option yet. Does Cron do anything differently?Unrelated I am seeing this error in the Ipv4 lists. The lists are empty.
===[ IPv4 Process ]================================================= [ Abuse_Feodo_C2_v4 ] Reload . completed .. Empty file, Adding '127.1.7.7' to avoid download failure. ------------------------------ Original Master Final ------------------------------ 0 1 1 [ Pass ] ----------------------------------------------------------------- [ Abuse_SSLBL_v4 ] Reload . completed .. Empty file, Adding '127.1.7.7' to avoid download failure. ------------------------------ Original Master Final ------------------------------ 0 0 0 [ Pass ] -----------------------------------------------------------------
-
here are all the settings
-
This is the ancient 'legacy' mode. Consider the Unbound mode as the method not to use.
I presume you use the resolver (unbound), and have these set :
so, use the more modern (since 2022 ?) "Python mode".
Python mode mode is way faster, more details, etc.
Afaik : The "cron" is used for log rotation and stats maintenance. It's also use to determine if it's time to try to re download IP and DNSBL files. -
@Gertjan I have not set that in Unbound. No Python Module is active there. I saw that in another thread but I don't think it will change anything. Also which of these settings for the unbound python mode should be enabled here?
I also have no script to select under Unbound:
-
@Gertjan After changing to Unbound python mode I see some stuff. It also shows me a different response now in nslookup. This is new ";; Got SERVFAIL reply from 127.0.0.53
** server can't find c.bing.com: SERVFAIL" Is this supposed to happen?nslookup c.bing.com Server: 127.0.0.53 Address: 127.0.0.53#53 Non-authoritative answer: Name: c.bing.com Address: 0.0.0.0 ;; Got SERVFAIL reply from 127.0.0.53 ** server can't find c.bing.com: SERVFAIL
Under alerts I see this now:
Soure is almost every time 127.0.0.1 and my pfsense domainAlso any idea why I see this when I am not using google dns?
-
Is it normal to see these entries under Reports -> DNSBL Reply Stats? I have filtered for feodotracker.
If I look under Overview tab I see stuff happening now but once I click the little 2 to send me to Alerts it shows no Alerts there.
I also see a lot of 127.0.0.1 and sometimes my local IPs. Is there a way to see which device made the connection under 127.0.0.1?I also assume these are supposed to show up once an hour when the new lists are checked?
-
@rasputinthegreatest said in pfBlockerNG not logging anything by default?:
After changing to Unbound python mode I
and then Save the unbound/resolver settings.
the Apply (mandatory).Then here :
and check that DNSBL Mode is set to Unbound Python mode.
Leave the other options as is - you can come back later and select them - and try to understand what they are doing (I admit that some of them are still rocket sience to me, so I fall back to "KIS, don't activate what I don't understand").Save this page - at the bottom.
Then :
and hit Run.
Check the log produced for any issues - report what you find suspect or don't understand.
-
@Gertjan I did it exactly the way you showed. I posted some of the stuff I don't understand like it showing:
Servfail now. I see some resolves for feodotracker. I assume this is just the updates for the lists and not actually stuff being blocked? I only see 3 blocks so far on the main overview but not in the logs still. I also don't understand all these 127.0.0.1 resolves that don't tell me what device initiated it. Should I be seeing more blocks in general from DNSBL? -
This :
did you execute that on the pfSense command line ?
This :
;; Got SERVFAIL reply from 127.0.0.53 ** server can't find c.bing.com: SERVFAIL
means that the device that you are using was told that its DNS is 127.0.0.53. (that is the device itself !)
But ... non DNS server is listing on that address.
That device, can't you set it to use DHCP ? If you do, it will get an IP, a network, a gateway and a DNS, where the last two will be the pfSense LAN IP. From then on, that device will have a working In tenet connection, local network and DNS. That's why every device you buy (create) use DHCP ... as it works out of the box.If I execute the same command on pfSense, I see :
[25.07-RELEASE][root@pfSense.bhf.tld]/root: nslookup c.bing.com Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: c.bing.com canonical name = c-bing-com.ax-0001.ax-msedge.net. c-bing-com.ax-0001.ax-msedge.net canonical name = ax-0001.ax-msedge.net. Name: ax-0001.ax-msedge.net Address: 150.171.27.10 Name: ax-0001.ax-msedge.net Address: 150.171.28.10 Name: ax-0001.ax-msedge.net Address: 2620:1ec:33:1::10 Name: ax-0001.ax-msedge.net Address: 2620:1ec:33::10
Your "127.0.0.53" tells me : the DNS request isn't asked from pfSense, which has some LAN IP and not a localhost IP - but a local DNS (resolver ? forwarder ?) - for for what I know, maybe this process doesn't use pfSense (== unbound => pfBLockerng ...)
hen I execute on a PC, situated on my pfSense LAN , I see :
C:\Users\Gauche>nslookup c.bing.com Serveur : pfSense.hf.tld Address: 2a01:cb19:dead:beef:92ec:77ff:fe29:392c Réponse ne faisant pas autorité : Nom : ax-0001.ax-msedge.net Addresses: 2620:1ec:33:1::10 2620:1ec:33::10 150.171.27.10 150.171.28.10 Aliases: c.bing.com c-bing-com.ax-0001.ax-msedge.net
where "2a01:cb19:dead:beef:92ec:77ff:fe29:392c" is the LAN (IPv6) of my pfSense.
"pfSense.hf.tld" is the host name of my pfSense.This means my Windows PC uses pfSense as it's "DNS server", which is nice, as pfSense uses unbound as the server = the resolver, and unbound sues also pfBlockerng to filter.
My unbound settings are prertty default, I resolve with the resolver.@rasputinthegreatest said in pfBlockerNG not logging anything by default?:
Also any idea why I see this when I am not using google dns?
Not you, the person. Your devices, processes that are running on them, if you have something that is android (Google) base will use 8.8.8.8 as their role is : whatever you do, communicate it to Google (that is the deal). So, yeah, 8.8.8.8 (the reverse) can be looked up for.
It won't be pfSense that is looking for the reverse of 8.8.8.8. Netgate isn't Google, pfSense doesn't use 8.8.8.8. 8.8.8.8 is a resolver, pfSense has its own resolver (unbound). -
@Gertjan said in pfBlockerNG not logging anything by default?:
means that the device that you are using was told that its DNS is 127.0.0.53. (that is the device itself !)
But ... non DNS server is listing on that addressBut internet is working. It already uses DHCP. It is a Ubuntu device and afaik that's how the network manager works in Ubuntu. It is a link to another file in the conf. It still resolves to my pfsense 192.168.1.1 and I can see resolves from the Ubuntu devices IP in the logs. It might be a Ubuntu setting but I am not sure.
@Gertjan said in pfBlockerNG not logging anything by default?:
Serveur : pfSense.hf.tld
Address: 2a01:cb19:dead:beef:92ec:77ff:fe29:392cRéponse ne faisant pas autorité :
Nom : ax-0001.ax-msedge.net
Addresses: 2620:1ec:33:1::10
2620:1ec:33::10
150.171.27.10
150.171.28.10
Aliases: c.bing.com
c-bing-com.ax-0001.ax-msedge.netI am getting the same response on a Windows 10 device but c.bing.com is on the blocklist of DNSBL. So it should not work, right?
Maybe the issue comes from running Double-NAT? I have my ISP router (running Quad9DNS) and Pfsense sits behind it with a local IP as WAN IP.
Here are my Unbound settings. General Setup I already showed above.
@Gertjan said in pfBlockerNG not logging anything by default?:
Your devices, processes that are running on them
There should be no device running google anywhere in my network.At least nothing behind pfsense.
-
@rasputinthegreatest said in pfBlockerNG not logging anything by default?:
It is a Ubuntu device
Ah, ok. I'm not familiar with Unbuntu but I do use Debian myself.
Like pfSense (based upon FreeBSD) there is file called /etc/resolv.conf which contains something like :nameserver 127.0.0.1 nameserver ::1 ....
which means that programs process running on that system know where to go with their DNS requests.
Guess who listens on port 127.0.0.:53 on pfSense ?
Let's ask ;)
[25.07-RELEASE][root@pfSense.bhf.tld]/root: sockstat -4 | grep ':53'
avahi avahi-daem 61533 13 udp4 *:5353 :
unbound unbound 14531 5 udp4 *:53 :
unbound unbound 14531 6 tcp4 *:53 :
....If you Ubuntu was told that DNS requests have to send to 127.0.0.53 (probably port 53) then there must be a process that handles DNS requests listening on that address:port. If there is none, then you get a service fail or "SERV FAIL" as no DNS service is avaible.
That needs to be set up correced ^^@rasputinthegreatest said in pfBlockerNG not logging anything by default?:
I have my ISP router (running Quad9DNS)
I have also a ISP 'upstream' router. Somewhat mandatory for me as that device knows how to talk to the 'laser led wire' (fiber) and handles the login against my ISP.
My ISP router probably uses the ISP's DNS servers, I'm not sure.
pfSense gets a WAN IP from this ISP router, which will be a RFC1918 like 192.168.10.4.
By default, pfSense won't use an DNS suggestion that comes with the lease from the ISP routers DHCP server, as (my) pfSense resolves.Here are my Unbound settings. General Setup I already showed above
Pretty default so you're good.