PfBlockerNG v2.0 w/DNSBL
-
@haleakalas:
Follow up on my own earlier post.
It turns out that the php command is not executed at all, that's probably why my browser times out after a few minutes.When I run the same command (php /usr/local/www/pfblockerng/pfblockerng.php dc) in a "php command window" (without the php part) I get the following message:
Parse error: syntax error, unexpected '/' in /tmp/V7fSSN on line 5I reinstalled pfblockerng once again thinking that maybe i damaged something during my file edit earlier, but same things have happened.
The install seems to go through. The package doesn't show up in the menu.If only pfsense would allow to go back to an earlier version of a package…
Going back to an earlier will not work as the MaxMind GeoIP database changes since.
Before the db was in range format, now it is in CIDR format. BBcan177 will fix this in a week or so. In the meantime we are try to get thing going by raising the php memory limit.Can you retry the php /usr/local/www/pfblockerng/pfblockerng.php dc command from the shell (option 8 or SSH) to see if it succeeds.
Once this works, there is no need to re-run it. The next change to the DB will in a month.Did you read https://forum.pfsense.org/index.php?topic=116307 ? Please reply in that post for the memory issue.
-
Seems like the code is bugged, reinstalling the package doesnt even work, the post install script fails and the pfblocker interface doesnt show up in the firewall tab.
Installation might fail at the MaxMind GeoIP step, the memory issue is discussed here https://forum.pfsense.org/index.php?topic=116307
-
@haleakalas:
Follow up on my own earlier post.
It turns out that the php command is not executed at all, that's probably why my browser times out after a few minutes.When I run the same command (php /usr/local/www/pfblockerng/pfblockerng.php dc) in a "php command window" (without the php part) I get the following message:
Parse error: syntax error, unexpected '/' in /tmp/V7fSSN on line 5I reinstalled pfblockerng once again thinking that maybe i damaged something during my file edit earlier, but same things have happened.
The install seems to go through. The package doesn't show up in the menu.If only pfsense would allow to go back to an earlier version of a package…
Hi did you look at RonpfS remark #26 in the thread below?
https://forum.pfsense.org/index.php?topic=116307.15
-
One consequence of the MaxMind GeoIP change is that IPV6 table are much bigger than before.
So if you are blocking loads of Country, you might ran out of memory processing the feeds and loading the rules.For some users, you may have to fix the pfblockerng.inc file.
You may also have to change the Firewall Maximum Table Entries.There is a note under GeoIP
Note: pfSense by default implicitly blocks all unsolicited inbound traffic to the WAN interface.
Therefore adding GeoIP based firewall rules to the WAN will not provide any benefit, unless there are open WAN ports.It's also not recommended to block the 'world', instead consider rules to 'Permit' traffic from selected Countries only.
Also consider protecting just the specific open WAN ports and it's just as important to protect the outbound LAN traffic.Some users change from blocking the "World" to allowing specific countries and that fixes the memory issues.
You can read the following topic Taming the beasts… aka suricata blueprint. It explain the concept of setting up a Firewall. Some information is outdated, but the concepts are still actual.
-
@haleakalas:
Follow up on my own earlier post.
It turns out that the php command is not executed at all, that's probably why my browser times out after a few minutes.When I run the same command (php /usr/local/www/pfblockerng/pfblockerng.php dc) in a "php command window" (without the php part) I get the following message:
Parse error: syntax error, unexpected '/' in /tmp/V7fSSN on line 5I reinstalled pfblockerng once again thinking that maybe i damaged something during my file edit earlier, but same things have happened.
The install seems to go through. The package doesn't show up in the menu.If only pfsense would allow to go back to an earlier version of a package…
Hi did you look at RonpfS remark #26 in the thread below?
https://forum.pfsense.org/index.php?topic=116307.15
I did but it wasn't the problem or the solution in my case. What I did finally to make it work was:
-
I reinstalled the package manager of pfsense using a remote ssh access. Several attempts to run it through the GUI Command Prompt miserably failed with a variety or error messages. Literally every time with a different message (real twilight zone…)
-
I reinstalled pfBlockerNG again. It showed up on the Firewall menu.
-
I forced a cron update - everything went ok and the package is up and running.
So, finally I did not increase the memory allocation to 300MB or more.
Clearly, I don't quite understand why what has been working well for over a month suddenly started to fail. Neither do I understand why reinstalling pfBlockerNG made it disappear from the Firewall Menu and from there everything fell apart.
The only thing I can tell for sure is that this system was left alone and in good working condition for over a month. No update or upgrade was necessary nor any such action was initiated by admin.
I am quite concerned now that pfSense is actually running internal updates without confirmation by admin, because the package manager was not broken. And I do not buy the idea that an ill behaving package caused the failure of the package manager as it was suggested elsewhere in the forums.That said, I fail to understand why pfBlockerNG needs to go into an hourly update spree! I changed it to a daily update.
-
-
There is an issue with the pkg manager that is fixed and will be made availabe at some point
https://redmine.pfsense.org/issues/6665 -
@haleakalas:
Follow up on my own earlier post.
It turns out that the php command is not executed at all, that's probably why my browser times out after a few minutes.When I run the same command (php /usr/local/www/pfblockerng/pfblockerng.php dc) in a "php command window" (without the php part) I get the following message:
Parse error: syntax error, unexpected '/' in /tmp/V7fSSN on line 5I reinstalled pfblockerng once again thinking that maybe i damaged something during my file edit earlier, but same things have happened.
The install seems to go through. The package doesn't show up in the menu.If only pfsense would allow to go back to an earlier version of a package…
Going back to an earlier will not work as the MaxMind GeoIP database changes since.
Before the db was in range format, now it is in CIDR format. BBcan177 will fix this in a week or so. In the meantime we are try to get thing going by raising the php memory limit.Can you retry the php /usr/local/www/pfblockerng/pfblockerng.php dc command from the shell (option 8 or SSH) to see if it succeeds.
Once this works, there is no need to re-run it. The next change to the DB will in a month.Did you read https://forum.pfsense.org/index.php?topic=116307 ? Please reply in that post for the memory issue.
Ron, I was able to fix my system per the actions in my reply to Qinn. So, everything is well now except for the many hours wasted time.
But since you diligently intervened in this saga a short summary about the sequence of events in my case.- pfSense was upgraded to 2.3.2 the day after it was released. The packages were upgraded in the vacuum. I don't recall ever doing a pfBlockerNG specific package upgrade.
- After the upgrade my system has been running flawlessly for many days.
- Couple of days ago, out of the blue I got error messages pointing at pfBlockerNG running out of memory with the 128MB limit thing.
- Prior to consulting the forums, I attempted to reinstall pfBlockerNG thinking that a fresh install would solve the problem with the most up to date code and tables etc. Huge mistake!, pfBlockerNG disappears from the radar or the Firewall menu, although every installation attempt results in "Success". (The coders should maybe check their understanding about what success is…)
- During that time all the advice about editing the php config file and increasing the memory limit to 300MB or more was futile at least in my case. Further, I doubt that the php command actually worked on a broken or semi broken pfBlockerNG (I mean when pfBlocker is in such a state that it doesn't show up in the Firewall menu)
- Glancing through other threads I suspected that my system's problem was about a broken package installer. Unfortunately attempts to reinstall it through the GUI did not work either. Eventually remote ssh allowed for a clean reinstall.
- Then GUI based reinstall of pfBlocker and forced cron table updates to verify that all was well.
- But then, what was that memory limit thing that never showed up again. Btw, my system uses only 600,000 of the 2,000,000 firewall table entries. So that whole discussion was also irrelevant in my system's case.
Final thought: It would be truly fantastic if pfsense implemented a button called "Leave My System Alone" so that the admin could freeze a well behaving system in that shape and form. No structural changes of internal tables, no new code, no updates, nothing - not even virus table updates nor country code table updates.
-
Well things change over time. IP changes so we need to keep updating, MaxMind changed the format, then pfBlockerNG had to adapt.
At the same time pfsense changes. So things can break from time to time.Keep in mind that Open Source projects like pfsense are developed by people on their free time. So time and resources are limited.
In the case of pfBlockerNG 2.1, there was a dozen users without issue till this month's MaxMind update. Users ranged from 1gb to 16gb (32-64bit) boxes.
Even then, in a few hours, BBcan177 (traveling) was finding solutions while busting his data plan :o.
-
@haleakalas good that you solved it. On the part of the "leave this system alone" part I cannot agree, security requires maintenance. That's why I prefer open source software, because:
1. It's open.
2. It's maintained (thumbs up to everyone here!!!)The problem IMHO with (commercial) software development is that you never get the chance to do it right, things like cleaning up code, education etc. cost money and thus are not allowed or have a limited lifespan, which invokes insecure systems. That's why I never ever used an router/WiFi provided by the ISP, but millions do and I think that they contribute highly to the Internets instability, but that's just my two cents ;)
-
I have a huge issue with the last update as well. It eats memory like a banshee in a matter of minutes!
Are you using the new DNSBL TLD feature?
I believe I had that turned on, I can't check now because after trying to re-install the package it doesn't show on the menu anymore even though it installs successfully. Apparently there is bad code in this update since it went from working fine to a lot of issues. I'd think 16Gb of RAM is more than enough.
-
The is an issue with MaxMind GeoIP mostly on i386 https://forum.pfsense.org/index.php?topic=116307
There is also an issue with the pkg manager.
What do you see in pfblockerng.log system.log, what does the installation log looks like ?
-
Hi there I could use some help on the following settings:
Looking at the setup here => https://forum.pfsense.org/index.php?topic=102470.15 I still don't grasp what I should select at "DNSBL Firewall Rule" I have 2 NIC's; WAN and LAN with 2 VLAN's should I select te VLAN's also now only LAN is selected here and what about loopback and what will it bring?
Second is there any use when using DNSBL to ad list on the IP4 tab?
and thirdly with the "DNSBL IP Firewall Rule Settings:"setting here select outbound is suggested as default it's disabled, why?
Thanks for any explanation and your time!
Cheers Qinn
-
Add me to the list of users with new problems using pfBlockerNG. They also appeared after the pfSense update to the newest version and involve the same memory errors. I increased the number of table entries allowed by a factor of 2. It worked for a while, then the problem reappeared. I'm usjng a J1900 based supermicro motherboard with 8GB ram. I've been using pfSense about 1.5 years. Errorlogs were forwarded to pfsense.
I also suspect it has to do with geoblocking. I have now disabled all country blocking and use only a few malware lists. I like pfBlockerNG for the outbound protection.
Edit: this may be helpful: CPU usage was much higher with country blocking on the updated version with geoblocking. With geoblocking removed, cpu usage is very low again.
For my education, I would appreciate it if someone could offer answers to a few questions below.
1. I use OpenVPN and have a couple of servers available. One is bridged so I can access my home network from out of the house and feel secure. I also use remote desktop through it. It is safer than remote TeamViewer (using their servers) this way. The other is routed for simple pass through over public wifi.
Question: Does OpenVPN protect the ports well enough? I use certificates, multiple passwords, and each device uses it's own certificate, and the name on the certificate match match the userid. the config file names have been changed to hide the device name. I assume this is about as safe as you can get. Is pfBlockerNG country blocking overkill in this instance?
- Regarding SPI, assuming someone tries to hack my ip 123.44.55.12:4321 which happens to be open because a browser just sent out a request on port 4321. Am I at risk and in need on country blocking, or will SPI protect that port because it is not a specific response to the browser request? I see hundreds of attempted hacks daily using pfBlockerng geoblocking.
I also use Snort and have managed to get all the false positives out of the way. It seems to catch a lot. I have no idea if it is serious stuff it stops or just noise. I purchased a one year oinkcode.
If the answer to both indicate safety, then all I need concern myself with is malware site list blocking. I can only assume country blocking uses a tremendous amount of resources
-
Hi there I could use some help on the following settings:
Looking at the setup here => https://forum.pfsense.org/index.php?topic=102470.15 I still don't grasp what I should select at "DNSBL Firewall Rule" I have 2 NIC's; WAN and LAN with 2 VLAN's should I select te VLAN's also now only LAN is selected here and what about loopback and what will it bring?
I don't have VLAN, but 2 LANs, I selected both and loopback.
Second is there any use when using DNSBL to ad list on the IP4 tab?
and thirdly with the "DNSBL IP Firewall Rule Settings:"setting here select outbound is suggested as default it's disabled, why?
Thanks for any explanation and your time!
Cheers Qinn
The DNSBL feeds contain IPs, so it put those in an Alias. If you don't want to block IP, you can keep the Firewall Rule "disabled" and no rules will be created.
-
-
Is there a patch comming anytime soon to fix this?
-
Hi Everyone,
I just wanted to share another source of feeds that you can pull in. Register for free at https://otx.alienvault.com. Once you get logged in start searching the pulses for ipv4 or domain etc to pull the lists you want. When you hit the download page click download, right click CSV; this is the feed you want to load into your DNSBL.
Also note that IOCs can contain file hashes and other types of data not useful to pfblockerng. In that case you can click "create pulse", copy the CSV feed you want to include, and follow the wizard through to remove any of the IOCs that cant be read by pfblockerng.
Edit: Ah nevermind, these don't parse clean
local-data: "'domain','akamaitechnologysupport.com','' 60 IN A 10.10.10.1"
-
-
Hi Everyone,
I just wanted to share another source of feeds that you can pull in. Register for free at https://otx.alienvault.com. Once you get logged in start searching the pulses for ipv4 or domain etc to pull the lists you want. When you hit the download page click download, right click CSV; this is the feed you want to load into your DNSBL.
Also note that IOCs can contain file hashes and other types of data not useful to pfblockerng. In that case you can click "create pulse", copy the CSV feed you want to include, and follow the wizard through to remove any of the IOCs that cant be read by pfblockerng.
Edit: Ah nevermind, these don't parse clean
local-data: "'domain','akamaitechnologysupport.com','' 60 IN A 10.10.10.1"
When BBcan177 return from vacation, he will look at this.
-
Is it possible to use DNSBL on a transparent firewall (none of the NIC's has an IP except for the Bridge itself (10.1.0.10))? I am asking because I tried and I can't seem to access the VIP at 172.16.15.14. I guess NAT does not work with bridges.. hmm, any help appreciated. I'd really like to use DNSBL! Thanks!