• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Country Block

pfSense Packages
79
691
663.4k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    marcelloc
    last edited by Oct 28, 2011, 9:37 PM

    ok, I think its good enough to prevent errors until some 'core developer' could help us.

    I'll try to put it in php way for most code compatibility.

    The last thing to finish pfBlocker is cron package integration.

    Treinamentos de Elite: http://sys-squad.com

    Help a community developer! ;D

    1 Reply Last reply Reply Quote 0
    • T
      tommyboy180
      last edited by Oct 28, 2011, 9:44 PM Oct 28, 2011, 9:42 PM

      Cron for the updates?

      -Tom Schaefer
      SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

      Please support pfBlocker | File Browser | Strikeback

      1 Reply Last reply Reply Quote 0
      • M
        marcelloc
        last edited by Oct 28, 2011, 9:56 PM

        use cron package instead of editing /etc/cront for lists updates…

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • S
          sekular
          last edited by Oct 29, 2011, 12:40 AM

          Great work so far on the pfblocker package. I currently have a problem with it. I had countryblock installed and working previously. I removed that package and then installed the pfblocker package. The widget says that it is blocking networks but it comes up with a fail to load list message in the syslog.

          Oct 29 01:38:43 php: : The command '/sbin/pfctl -o basic -f /tmp/rules.debug' returned exit code '1', the output was 'no IP address found for 1139.82.0.0/16 /tmp/rules.debug:16: file "/var/db/aliastables/pfBlockerInbound.txt" contains bad data no IP address found for 1139.82.0.0/16 /tmp/rules.debug:18: file "/var/db/aliastables/pfBlockerOutbound.txt" contains bad data pfctl: Syntax error in config file: pf rules not loaded'
          Oct 29 01:38:43 php: : New alert found: There were error(s) loading the rules: no IP address found for 1139.82.0.0/16 /tmp/rules.debug:16: file "/var/db/aliastables/pfBlockerInbound.txt" contains bad data no IP address found for 1139.82.0.0/16 /tmp/rules.debug:18: file "/var/db/aliastables/pfBlockerOutbound.txt" contains bad data pfctl: Syntax error in config file: pf rules not loaded The line in question reads [16]: table <pfblockerinbound>persist file "/var/db/aliastables/pfBlockerInbound.txt"
          Oct 29 01:38:43 php: : There were error(s) loading the rules: no IP address found for 1139.82.0.0/16 /tmp/rules.debug:16: file "/var/db/aliastables/pfBlockerInbound.txt" contains bad data no IP address found for 1139.82.0.0/16 /tmp/rules.debug:18: file "/var/db/aliastables/pfBlockerOutbound.txt" contains bad data pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [16]: table <pfblockerinbound>persist file "/var/db/aliastables/pfBlockerInbound.txt"

          This is what happens when i only try to block countries and set none on the list block. I can try inbound or outbound and still get same error. I have tried reinstalling it. Do you know what it might be?</pfblockerinbound></pfblockerinbound>

          1 Reply Last reply Reply Quote 0
          • M
            marcelloc
            last edited by Oct 29, 2011, 12:46 AM

            Post here the countries you selected.

            I will check the script.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • S
              sekular
              last edited by Oct 29, 2011, 1:11 AM

              I tired various countries, I get the same result when I select whitelist. I get the same result with all the countries. I have selected one from top spammers and one from south america. I also noticed that when i select one country from a tab then i can not unselect it. I can only select other ones. Using Chrome.

              Oct 29 02:07:23 php: : The command '/sbin/pfctl -o basic -f /tmp/rules.debug' returned exit code '1', the output was 'no IP address found for 192.168.81.0/2411.0.1.0/24 /tmp/rules.debug:16: file "/var/db/aliastables/pfBlockerWL.txt" contains bad data pfctl: Syntax error in config file: pf rules not loaded'
              Oct 29 02:07:23 php: : New alert found: There were error(s) loading the rules: no IP address found for 192.168.81.0/2411.0.1.0/24 /tmp/rules.debug:16: file "/var/db/aliastables/pfBlockerWL.txt" contains bad data pfctl: Syntax error in config file: pf rules not loaded The line in question reads [16]: table <pfblockerwl>persist file "/var/db/aliastables/pfBlockerWL.txt"
              Oct 29 02:07:23 php: : There were error(s) loading the rules: no IP address found for 192.168.81.0/2411.0.1.0/24 /tmp/rules.debug:16: file "/var/db/aliastables/pfBlockerWL.txt" contains bad data pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [16]: table <pfblockerwl>persist file "/var/db/aliastables/pfBlockerWL.txt"

              The rules and alias appear to be created ok.</pfblockerwl></pfblockerwl>

              1 Reply Last reply Reply Quote 0
              • M
                marcelloc
                last edited by Oct 29, 2011, 1:54 AM Oct 29, 2011, 1:31 AM

                I found the error.

                It's fixed now.

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • M
                  marcelloc
                  last edited by Oct 29, 2011, 1:37 AM

                  tommyboy,

                  Instead of editing /tmp/rules.debug, i will 'patch' filter.inc file with table-entries when clients choose to increase table.

                  I will also write some code to alert user when table gets larger then default limit.

                  Treinamentos de Elite: http://sys-squad.com

                  Help a community developer! ;D

                  1 Reply Last reply Reply Quote 0
                  • T
                    tommyboy180
                    last edited by Oct 29, 2011, 2:28 AM

                    That sounds like a good solution. We can use sed to insert the line to 'patch' and remove the line to 'unpatch'

                    -Tom Schaefer
                    SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                    Please support pfBlocker | File Browser | Strikeback

                    1 Reply Last reply Reply Quote 0
                    • M
                      marcelloc
                      last edited by Oct 29, 2011, 5:52 AM Oct 29, 2011, 4:58 AM

                      I don't believe this:

                      Look what i found in filter.inc  after coding everything…

                      set limit table-entries {$config['system']['maximumtableentries']}

                      it was all time in front of our noses  :D

                      I'll fix the code and relase a new version..

                      Treinamentos de Elite: http://sys-squad.com

                      Help a community developer! ;D

                      1 Reply Last reply Reply Quote 0
                      • M
                        marcelloc
                        last edited by Oct 29, 2011, 11:18 AM

                        PfBlocker 0.1.3 is out.

                        Main improvement:

                        Check network list size before applying rules. If lists are bigger then table size, pfBlocker sends a warning to user and suggest new value for table size.

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • M
                          marcelloc
                          last edited by Oct 29, 2011, 12:10 PM

                          tommyboy,

                          I've started a new topip for pfBlocker, if you don't mind.

                          http://forum.pfsense.org/index.php/topic,42543.0.html

                          Treinamentos de Elite: http://sys-squad.com

                          Help a community developer! ;D

                          1 Reply Last reply Reply Quote 0
                          • S
                            Supermule Banned
                            last edited by Oct 29, 2011, 12:43 PM

                            Pfblocker???

                            1 Reply Last reply Reply Quote 0
                            • M
                              marcelloc
                              last edited by Oct 29, 2011, 2:36 PM

                              @Supermule:

                              Pfblocker???

                              yes, countryblock evolution started  after this post from cmb

                              http://forum.pfsense.org/index.php/topic,25732.msg218002.html#msg218002

                              take a look.

                              Treinamentos de Elite: http://sys-squad.com

                              Help a community developer! ;D

                              1 Reply Last reply Reply Quote 0
                              • T
                                tommyboy180
                                last edited by Oct 29, 2011, 2:57 PM

                                @Supermule:

                                Pfblocker???

                                pfblocker will combine IP-Blocklist and Countryblock into a single package. It is going to be officially more stable than any release of Countryblock and IP-Blocklist thanks to all the hard work of marcelloc!

                                @marcelloc:

                                I don't believe this:

                                Look what i found in filter.inc  after coding everything…

                                set limit table-entries {$config['system']['maximumtableentries']}

                                it was all time in front of our noses  :D

                                I'll fix the code and relase a new version..

                                That is awesome! I didn't even see that. Glad you caught it.

                                -Tom Schaefer
                                SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                                Please support pfBlocker | File Browser | Strikeback

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Supermule Banned
                                  last edited by Oct 29, 2011, 3:21 PM

                                  Who came up with the idea for this??? ;)

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    marcelloc
                                    last edited by Oct 29, 2011, 3:28 PM

                                    The first goal was to Fix countryblock. Everything after this was 'forum brainstorm'.

                                    Treinamentos de Elite: http://sys-squad.com

                                    Help a community developer! ;D

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      woc38
                                      last edited by Jan 5, 2012, 4:52 PM

                                      Tommyboy, don't know if you are still reading this. I have pfSense 2.0 release with the Country Block package. I didn't 'upgrade' to pfBlocker yet.
                                      Today I did an upgrade from pfSense 2.0 Release to 2.0.1 Release. During reboot, all packages are reinstalled. But, it loops in removing/installing Country Block:

                                      Cleaning up... Beginning package installation for Country Block...
                                      Downloading package configuration file... done.
                                      Saving updated package information... done.
                                      Downloading Country Block and its dependencies...
                                      Loading package configuration... done.
                                      Configuring package components...
                                      Additional files... done.
                                      Loading package instructions...
                                      Custom commands...
                                      Executing custom_php_install_command()...done.
                                      Executing custom_php_resync_config_command()...done.
                                      Custom commands...
                                      Executing custom_php_install_command()...done.
                                      Executing custom_php_resync_config_command()...done.
                                      Backing up libraries...
                                      Removing package...
                                      Removing Country Block components...
                                      Tabs items... done.
                                      Menu items... done.
                                      Loading package instructions...
                                      Deinstall commands... done.
                                      Removing package instructions...done.
                                      Auxiliary files... done.
                                      Package XML... done.
                                      Configuration... done.
                                      Cleaning up... Beginning package installation for Country Block...
                                      Downloading package configuration file... done.
                                      Saving updated package information... done.
                                      Downloading Country Block and its dependencies...
                                      Loading package configuration... done.
                                      Configuring package components...
                                      Additional files... done.
                                      Loading package instructions...
                                      Custom commands...
                                      Executing custom_php_install_command()...done.
                                      Executing custom_php_resync_config_command()...done.
                                      Custom commands...
                                      Executing custom_php_install_command()...done.
                                      Executing custom_php_resync_config_command()...done.
                                      Menu items... Backing up libraries...
                                      Removing package...
                                      Removing Country Block components...
                                      Tabs items... done.
                                      Menu items... done.
                                      Loading package instructions...
                                      Deinstall commands... done.
                                      Removing package instructions...done.
                                      Auxiliary files... done.
                                      Package XML... done.
                                      Configuration... done.
                                      Cleaning up... Beginning package installation for Country Block...
                                      Downloading package configuration file... done.
                                      Saving updated package information... done.
                                      ...etc...
                                      
                                      

                                      I can't remove the package through the webinterface, because it says "package are being reinstalled in the background". I don't know what to do. The console just loops and loops…

                                      Do you have an other way of removing the package. I don't want to do a complete new install...

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        tommyboy180
                                        last edited by Jan 5, 2012, 11:13 PM

                                        That's really strange. I tested on 2.0.1 but it was a fresh install. I didn't test upgrade from 2.0 to 2.0.1.
                                        Manually remove the package. Remove the package from your config file and also from /usr/local/pkg
                                        Try to re-install after everything is removed and after reboot.

                                        @woc38:

                                        Tommyboy, don't know if you are still reading this. I have pfSense 2.0 release with the Country Block package. I didn't 'upgrade' to pfBlocker yet.
                                        Today I did an upgrade from pfSense 2.0 Release to 2.0.1 Release. During reboot, all packages are reinstalled. But, it loops in removing/installing Country Block:

                                        Cleaning up... Beginning package installation for Country Block...
                                        Downloading package configuration file... done.
                                        Saving updated package information... done.
                                        Downloading Country Block and its dependencies...
                                        Loading package configuration... done.
                                        Configuring package components...
                                        Additional files... done.
                                        Loading package instructions...
                                        Custom commands...
                                        Executing custom_php_install_command()...done.
                                        Executing custom_php_resync_config_command()...done.
                                        Custom commands...
                                        Executing custom_php_install_command()...done.
                                        Executing custom_php_resync_config_command()...done.
                                        Backing up libraries...
                                        Removing package...
                                        Removing Country Block components...
                                        Tabs items... done.
                                        Menu items... done.
                                        Loading package instructions...
                                        Deinstall commands... done.
                                        Removing package instructions...done.
                                        Auxiliary files... done.
                                        Package XML... done.
                                        Configuration... done.
                                        Cleaning up... Beginning package installation for Country Block...
                                        Downloading package configuration file... done.
                                        Saving updated package information... done.
                                        Downloading Country Block and its dependencies...
                                        Loading package configuration... done.
                                        Configuring package components...
                                        Additional files... done.
                                        Loading package instructions...
                                        Custom commands...
                                        Executing custom_php_install_command()...done.
                                        Executing custom_php_resync_config_command()...done.
                                        Custom commands...
                                        Executing custom_php_install_command()...done.
                                        Executing custom_php_resync_config_command()...done.
                                        Menu items... Backing up libraries...
                                        Removing package...
                                        Removing Country Block components...
                                        Tabs items... done.
                                        Menu items... done.
                                        Loading package instructions...
                                        Deinstall commands... done.
                                        Removing package instructions...done.
                                        Auxiliary files... done.
                                        Package XML... done.
                                        Configuration... done.
                                        Cleaning up... Beginning package installation for Country Block...
                                        Downloading package configuration file... done.
                                        Saving updated package information... done.
                                        ...etc...
                                        
                                        

                                        I can't remove the package through the webinterface, because it says "package are being reinstalled in the background". I don't know what to do. The console just loops and loops…

                                        Do you have an other way of removing the package. I don't want to do a complete new install...

                                        -Tom Schaefer
                                        SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                                        Please support pfBlocker | File Browser | Strikeback

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          sdennis72
                                          last edited by Apr 3, 2012, 1:54 AM

                                          Country IP Blocks (countryipblocks.net) is now moving to a paid subscription model and their "free" tables will now be out of date by the time they're made free.

                                          Perhaps Country Block could start getting its data from http://www.ipdeny.com/ipblocks/ instead?

                                          –Sean

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.