PfBlocker
-
The easiest way to workaround this is to create a custom list with action allow outbound(or both) and put companies ips there.
This way, these ips will be allowed before any coutry rule.
How do I know what range/ip is being blocked if nothing is being written to the FW logs?
John
-
You can use nslookup and/or tcpdump.
nslookup owa.company.com
tcpdump -ni your_pfsense_lan_interface host your_internal_pc_ip
-
The easiest way to workaround this is to create a custom list with action allow outbound(or both) and put companies ips there.
This way, these ips will be allowed before any coutry rule.
Unless I am missing it, there is not an option to "Permit Both". Should I create two lists: "Permit Inbound" and "Permit Outbound"?
Thx,
John
-
You could make a list with alias only and then just add the firewall rule on both wan and lan to permit it. That way you only have one list but reference it in both locations for both ways.
-
You could make a list with alias only and then just add the firewall rule on both wan and lan to permit it. That way you only have one list but reference it in both locations for both ways.
Good idea! :)
Thanks!
-
To use this way, you may need to change pfblocker action to alias only and then create your rules.
By default, pfblocker stays on top of rules.
-
This only happens if I reboot/shutdown my pfSense, when I perform boot it's there (this is why is important to perform at last a reboot to check if everything comes up fine again).
[filter_load] There were errors(s) loading the rules: /tmp/rules.debug:20
cannot define table pfBlockerAsia
cannot allocate memory/tmp/rules.debug:24
cannot define table pfBlockerNorthAmerica
cannot allocate memory/tmp/rules.debug.28
cannot define table pfBlockerTopSpammers
cat /tmp/rules.debug
#System aliases loopback = "{ lo0 }" WAN1 = "{ pppoe0 }" LAN1 = "{ em0 }" LAN2 = "{ em2 }" VDSL2 = "{ em1 }" #SSH Lockout Table table <sshlockout> persist table <webconfiguratorlockout> persist #Snort tables table <snort2c> table <virusprot> # User Aliases table <pfblockerafrica> persist file "/var/db/aliastables/pfBlockerAfrica.txt" pfBlockerAfrica = "<pfblockerafrica>" table <pfblockerasia> persist file "/var/db/aliastables/pfBlockerAsia.txt" <<< line 20 pfBlockerAsia = "<pfblockerasia>" table <pfblockereurope> persist file "/var/db/aliastables/pfBlockerEurope.txt" pfBlockerEurope = "<pfblockereurope>" table <pfblockernorthamerica> persist file "/var/db/aliastables/pfBlockerNorthAmerica.txt" <<< line 24 pfBlockerNorthAmerica = "<pfblockernorthamerica>" table <pfblockersouthamerica> persist file "/var/db/aliastables/pfBlockerSouthAmerica.txt" pfBlockerSouthAmerica = "<pfblockersouthamerica>" table <pfblockertopspammers> persist file "/var/db/aliastables/pfBlockerTopSpammers.txt" <<< line 28 pfBlockerTopSpammers = "<pfblockertopspammers>"</pfblockertopspammers></pfblockertopspammers></pfblockersouthamerica></pfblockersouthamerica></pfblockernorthamerica></pfblockernorthamerica></pfblockereurope></pfblockereurope></pfblockerasia></pfblockerasia></pfblockerafrica></pfblockerafrica></virusprot></snort2c></webconfiguratorlockout></sshlockout>
Cannot allocate memorypfctl
syntax error in config file: pf rules not loaded The line in question reads [20]: table <pfblockerasia>persist file /var/db/aliastables/pfBlockerAsia.txt
I didn't changed any of those files, I'm only blocking that area from the files it came with pfBlocker.
Any solution?
/var/db/aliastables(15): ls -la
total 1384
drwxr-xr-x 2 root wheel 512 May 6 01:42 .
drwxr-xr-x 12 root wheel 1024 May 13 12:38 ..
-rw-r–r-- 1 root wheel 41499 May 13 14:12 pfBlockerAfrica.txt
-rw-r--r-- 1 root wheel 196104 May 13 14:12 pfBlockerAsia.txt
-rw-r--r-- 1 root wheel 71153 May 13 14:12 pfBlockerEurope.txt
-rw-r--r-- 1 root wheel 772252 May 13 14:12 pfBlockerNorthAmerica.txt
-rw-r--r-- 1 root wheel 36792 May 13 14:12 pfBlockerSouthAmerica.txt
-rw-r--r-- 1 root wheel 242707 May 13 14:12 pfBlockerTopSpammers.txt</pfblockerasia> -
Did you go to system > Advanced > Firewall/Nat tab and increase the Firewall Maximum Table Entries?
I have had to increase mine quite a bit to run all my tables. I currently have mine set to 999999999 and no longer get any memory allocation errors.
-
Did you go to system > Advanced > Firewall/Nat tab and increase the Firewall Maximum Table Entries?
I have had to increase mine quite a bit to run all my tables. I currently have mine set to 999999999 and no longer get any memory allocation errors.
Nope.
Will do. Hope is only this.
Thanks!
-
I've been really busy (figuring out Postfix).
I don't have time to update my previously posted spam lists.(Note: http://forum.pfsense.org/index.php/topic,42543.msg258273.html#msg258273)
For now I have a routine that extracts all new Spam IPs into one list - updated 2x/hour.
http://dl.dropbox.com/u/71477228/freshspam1.txtI'm also now harvesting spam IPs from a 2nd email server I manage.
http://dl.dropbox.com/u/71477228/freshspam2.txtAs I update these routines, the next rewrites will:
- filter out any IPs of major WebMail providers (GMail, AOL, Yahoo, Hotmail, etc)
For now, I whitelist US Yahoo email servers and Hotmail/Live/Microsoft Hosting.
http://dl.dropbox.com/u/71477228/YahooIPsUS.txt
http://dl.dropbox.com/u/71477228/hotmail.comIPs.txt- Sort spam IPs into my existing US and non-US spam lists
- Include relevant comment for each IP
- Drop off addresses that haven't had a spam hit in x#of days.
Edit: Here's a list of AOL outbound Email Servers
http://dl.dropbox.com/u/71477228/AOL_MailIPs.txtIt's compiled from the information on this page.
http://postmaster.info.aol.com/info/servers.html -
These spam lists have been effective w/o giving me false positives.
This is a list of fresh US Spam IPs from a major source, updated hourly.
http://dl.dropbox.com/u/71477228/usspamips.txtThis list contains fresh Spam IPs from US and other countries, updated hourly.
I'll eventually get it sorted into US/non-US.
http://dl.dropbox.com/u/71477228/worldspamips.txtPM me if you want more detail about them.
-
Just an FYI.
I looked around a lot for a versatile, online IP converter.
The only one I ever found is by Bluetack and it never showed up in any of my Google search queries.http://www.bluetack.co.uk/converter/
-
Hi there,
Sorry if I'm being a bit thick here and/or this question has already been asked, but can i use this package download blocklists, create Aliases against them, and then use standard pfsense firewall rules to block those ranges talking to/from just ONE port on a particular IP address (ie, allow it for all other ports)?
Thanks!
-
S_D,
Sure you can, just configure pfblocker and set action to alias only.
This way pfblocker download,create the lists and you can assgin these aliases to your own rules.
att,
Marcello Coutinho -
Perfect! Thanks for the reply. I'll set it up tonight.
-
Hi :)
issue with system being stuck at "configuring firewall…" after reboot/startup with WAN interface down(or having wrong IP config)
using ctrl-c at console doesn't help.i think the issue is pf tries to grab the lists but keeps waiting?
I tried uninstalling pfblocker and it worked fine with WAN down.
removed aliases + used deny inbound did not helpI'm using pfblocker 1.0.2 and pfs nanobsd 2.0.1
Thank u!
-
I've pushed an update to avoid downloads during boot process, reinstall the package and test again.
att,
Marcello Coutinho -
I've pushed an update to avoid downloads during boot process, reinstall the package and test again.
att,
Marcello CoutinhoI tried reinstalling but package version is still 1.0.2 and I faced the same issue.
Thank u
-
Try to get some info on system logs.
-
php: : The command '/usr/bin/grep -v '^#' '/var/db/aliastables/pfBlockerspyware.txt.tmp' > '/var/db/aliastables/pfBlockerspyware.txt'' returned exit code '2', the output was ''
php: : The command '/usr/bin/fetch -T 5 -q -o '/var/db/aliastables/pfBlockerspyware.txt.tmp' 'https://127.0.0.1:443/pfblocker.php?pfb=pfBlockerspyware'' returned exit code '1', the output was 'fetch: transfer timed out'
php: : The command '/sbin/pfctl -nf /tmp/rules.test.packages' returned exit code '1', the output was 'no IP address found for grep: /tmp/rules.test.packages:17: file "/var/db/aliastables/pfBlockerTopSpammers.txt" contains bad data no IP address found for grep: /tmp/rules.test.packages:19: file "/var/db/aliastables/pfBlockerads.txt" contains bad data no IP address found for grep: /tmp/rules.test.packages:21: file "/var/db/aliastables/pfBlockerspyware.txt" contains bad data no IP address found for grep: /tmp/rules.test.packages:23: file "/var/db/aliastables/pfBlockerhijacked.txt" contains bad data no IP address found for grep: /tmp/rules.test.packages:25: file "/var/db/aliastables/pfBlockerdshield.txt" contains bad data'