r/pfBlockerNG • • Oct 11 '26

Help Unbound python mode? Are you guys using it?

Although, they are a bit dated, I usually follow Lawrence Systems tutorials on pfSense, including the couple he has on setting up pfBlocker.
I haven't seen any of his tutorials mention the python option in pfBlocker so I have some questions about it. Do you use it?
I have read it helps with memory but increases latency a bit and introduces some issues with openVPN.

Should I enable it? although I am not sure what the use case is for it

12 Upvotes

19 comments sorted by

4

u/Seraph7777 Oct 11 '26

Best ever, use it. The only wise advise i can give for now.

1

u/amrogers3 Oct 11 '26

seems interesting. How do you use it different than base pfBlocker install?

1

u/Seraph7777 Oct 11 '26

Not much different as the normal one to be honest. But its much faster in what it needs to do. So the additional options gets more interesting. Definitely a win overall. Was also pretty sceptic at beginning to be honest.

1

u/amrogers3 Oct 11 '26

I dont really do regex stuff (yet) so I am not sure I see a need on my system. I did it on the last system and definitely noticed a increased latency with DNS queries

2

u/amrogers3 Oct 11 '26

but yet I still can't get rid of these. Sad.

4

u/Rameshk_k Oct 12 '26

I use Python mode in pfBlockerNG since they introduced it and have never had any issues. Everything works fine including OpenVPN.

1

u/Slight_Aerie_3611 Oct 14 '26

I did use it for several months, but switched back once I realized it was the root of an odd issue. After a monthly reboot DNS would not work, unless I went into this configuration - didn't change anything - and save it. Mysteriously would start working. Switched back to unbound mode and issue went away.

1

u/amrogers3 Oct 15 '26

I noticed some latency issues using it. However, that was using version 3.0. Once I switched back, my connections are much faster. I don't think I will try it again even though a newer version has been released.

2

u/andrebrait Dev of pfBlockerNG Oct 15 '26

As of 3.3, we still use synchronous I/O calls for database access and logging. Starting with 4.0 (alpha coming soon 🤞🏻) it's all async and the log file and database connection are always open and recover reliably even if something crashes

1

u/amrogers3 Oct 16 '26

Thanks Andre, so with 4.0, there won't be any latency issues with DNS using python mode?

2

u/andrebrait Dev of pfBlockerNG Oct 16 '26

Not any that I know of. I measured it quite a bit and it went from a couple extra ms per request down to under 0.05ms

3

u/andrebrait Dev of pfBlockerNG Oct 15 '26

Yeah, we had that indeed. IIRC we fixed it in 3.3.x at some point, which is not in Netgate's repos. You can install it from our own repo tho https://pkg.pfblockerng.com

3

u/abuhd Oct 11 '26

Yes. No issues.

3

u/yestaes Oct 11 '26

since 2023

1

u/BeeKay40 Oct 11 '26

I'm using it. No issues with OpenVPN. Tom's tutorials are still valid according to him. 

0

u/Main-Dish Oct 11 '26

I am using it for a company blocking social media but the scripts are limited and sometimes buggy when trying to modify values each time, sometimes it works sometimes it stop working requiring a reboot or something, havent messed with it for a long time now so i forgot the bugs and how to deal with them lol. I think it works with dns resolver and stops working with dns forwarding if i remember correctly.🤷🏻‍♂️ Trial and error my friend. For me personally i dont use pfblocker myself... Too buggy and unreliable sometimes and slow compared to alternative systems.

2

u/andrebrait Dev of pfBlockerNG Oct 15 '26

That's changing in 4.0 (alpha coming soon, but I'm daily driving it and so far so good)

1

u/casjquz Oct 11 '26

what are the alternative systems?