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

    Country Block

    Scheduled Pinned Locked Moved pfSense Packages
    691 Posts 79 Posters 688.9k Views
    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.
    • T
      technics
      last edited by

      Good luck mate.

      FWIW it appears that either squid or a misconfiguration of squid is what was causing my issue.  I removed squids cron jobs and uninstalled the package again, and now CB seems to stay running.  Going to test for a day and see what happens.  Hopefully I can figure out how to have both co-exist happily as I like squid.

      1 Reply Last reply Reply Quote 0
      • T
        tux3132
        last edited by

        @mgc6288:

        @tux3132:

        Hi everybody

        First of all a great thank to Countryblock developers !

        I have not understood what the email tab is used to ?

        Therefore I have configured it.

        SMTP auth no (All hosts on the lan can access the Postfix server)
        SMTP security none
        Host my_mail_server
        Port 25
        Username leave_blank
        Password leave_blank
        From email address my_own_address
        To email address admin_address
        Subject Test

        When I click "Save" I have a blank screen and my configuration is not saved when I come back to the email tab.

        When I fill in username, password after saving I click "Test" and I get the following error message :

        Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/www/packages/countryblock/class.smtp.php on line 122 Warning: fsockopen(): unable to connect to none://zimbra:25 in /usr/local/www/packages/countryblock/class.smtp.php on line 122 Mailer Error: SMTP Error: Could not connect to SMTP host.

        I have the same error when I replace the name of my mail server with its IP address.

        Any ideas ?

        Anticipated thanks.

        Best regards.

        Bernard

        Bernard,

        I believe this was addressed on page 20 as I had a similar problem…go back a few pages and you should find the answer.  I'll let you know when I get to this point of pfsense.

        Right now I succumbed to hitting the "Factory defaults" button but this time I am incrementally setting up pfsense.  Only LAN and WAN are configured leaving OPT1,2,3,4,5 offline along with configuring the Aliases, NAT, and Rules.  I installed CB and wow...not a single spam since setup last night.  I'm leaning towards the conclusion that there was some odd switch flipped or forgotten on the last setup as it is working now, or so it seems.  Tonight I will backup my current configuration and attempt a few more settings.

        I know this has been mentioned before and I believe the reason it was mentioned not done was due to a certain clearance level was needed but having a log just for CB showing what has been blocked for x hours/days would be awesome if just to confirm that stuff is blocked and that nothing has gone array with the configuration.  I know the System logs --> firewall are supposed to list something but I'm not familiar with deciphering what was blocked because of CB and what was for something else.

        I have removed IP-Blocklist
        I have enabled all interfaces
        I have tested that from my PFSense box my mail server could be contacted

        No success I have the same error : fsockopen(): php_network_getaddresses …

        Any Idea

        Best regards.

        Bernard

        1 Reply Last reply Reply Quote 0
        • T
          tommyboy180
          last edited by

          The email feature uses phpmailer which is separate from the countryblock package. If your having problems with email you should check to make sure your settings reflect what the mail provider requires. I do know it's really simple to get gmail on the email feature so please double check your settings.

          -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
          • Y
            yaw
            last edited by

            Thanks for the tip. I'll look at that today. Any thoughts on the reboot problem?

            1 Reply Last reply Reply Quote 0
            • T
              tommyboy180
              last edited by

              @yaw:

              Thanks for the tip. I'll look at that today. Any thoughts on the reboot problem?

              Check that /usr/local/etc/rc.d/countryblock.sh exists. This is the script that starts the package on boot.

              -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
              • Y
                yaw
                last edited by

                It exists. Any more ideas?

                1 Reply Last reply Reply Quote 0
                • T
                  tommyboy180
                  last edited by

                  @yaw:

                  It exists. Any more ideas?

                  It sounds like something is changing your FW rules. You may have a package installed that is doing that.
                  I have extensively tested this package on pfsense 1.2.3 and I consider it stable. Try to eliminate packages or traffic shaping to see if that corrects the issue.

                  -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
                  • Y
                    yaw
                    last edited by

                    It must be something to do with the 2.0 beta. I think you're right about the firewall rules. Whenever they change it kills country block. Something must be changing it after country block is running upon reboot.

                    No more time to work on it, I'll try again some other day.

                    Thanks!

                    1 Reply Last reply Reply Quote 0
                    • T
                      tommyboy180
                      last edited by

                      I did some testing on 2.0BETA not that long ago. I was able to keep it running. I should be receiving a laptop here soon. When I get that I can conduct much better testing on the package and perhaps help keep it stable.

                      -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
                      • Y
                        yaw
                        last edited by

                        Sounds good. I'll give it another go once it's been tested a bit more on 2.0.

                        1 Reply Last reply Reply Quote 0
                        • R
                          rajkedda
                          last edited by

                          Background:
                          I installed recently(3 weeks back) pfsense v1.2.3 and installed Country Block 0.1.9 Beta.  It was working fine and top spammers were blocked.  I added Cron package and it was still working fine.  I added few more countries into the list after that and worked fine.  
                          Issue Start:
                          Two days ago, all of a sudden, I see this Messag on the bottom
                          "Current Status = Running

                          You are blocking 0 Networks
                          "
                          and on the top:
                          "Check the country that you would like to block completely. Currently 15 of 246 selected."
                          What I have done to date:
                          1.  As of now, it has only Country Block pacakage installed and nothing else.
                          2.  I followed advice in the thread, removed the package, rebooted, reinstalled, rebooted and selected the countries again, committed the countries and enabled it. After that I did Save/Update.  I still get the same message:
                          "
                          Current Status = Running

                          You are blocking 0 Networks
                          "

                          Any help is greatly appreciated.
                          looked at the countries.txt file in this folder - /usr/local/www/packages/countryblock/lists  and it is empty file.

                          1 Reply Last reply Reply Quote 0
                          • T
                            tommyboy180
                            last edited by

                            First are you running version 1.2.3 or 2.0BETA? Are you running Traffic shaping or a proxy?

                            What you can do to troubleshoot more is run /usr/local/www/packages/countryblock/execute.sh in a shell and see if there are any errors produced.

                            Since you had the package working correctly at one point and now you can't get it to run, I would speculate that something changed. Perhaps a setting or adding a program. Something changed.

                            If you want you could send me your config to my email and I can dig into it more.

                            -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
                            • R
                              rajkedda
                              last edited by

                              Tom
                               Thank you for your quick response.  I am running v1.2.3 and not running traffic shaper, proxy or any other package.   I ran the script and here is the output
                              /usr/local/www/packages/countryblock/execute.sh
                              1 table deleted.
                              87
                              10
                              rm: /tmp/rules.debug.tmp: No such file or directory
                              rm: /tmp/rules.debug.tmp: No such file or directory
                              0
                              … to
                              200

                              Outside of adding more countries, I have not installed any packages or other changes.

                              Which file do you want me to send it to you and I will send it you.

                              1 Reply Last reply Reply Quote 0
                              • T
                                tommyboy180
                                last edited by

                                Email me your backup config file. Go to Diagnostics -> Backup/Restore and download your config.

                                I will look at your system config and determine why the package is not working for you.

                                -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
                                • R
                                  rajkedda
                                  last edited by

                                  Thanks Tom, I have emailed the config file to you.

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    tommyboy180
                                    last edited by

                                    @rajkedda:

                                    Thanks Tom, I have emailed the config file to you.

                                    I received your config file. I created a new install of pfsense 1.2.3 and used your config. The countryblock package installed right away. After that I slected Korea and pressed commit countries. Then I clicked Enable CountryBlock and clicked Save/Update.

                                    The package worked fine. I wasn't able to find anything wrong with your config or anything.

                                    -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
                                    • T
                                      tommyboy180
                                      last edited by

                                      Troubleshooting guide:

                                      Some people have been having issues getting the package to run. Before you think you need to rebuild pfsense try a simple test first.
                                      Go to Firewall -> Rules and pick a random entry. Click the edit button. Don't make any changes! Now click save.
                                      Go back to your package. Click commit countries. Now Ensure Enable is checked and Click Save.

                                      It should be running now.

                                      -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

                                        Anybody seeing freezes in PFSense 2.0 when committing countries in Country Block???

                                        This is what occurs in the system logs

                                        After a reboot when WebGui freezes…..

                                        Jan 24 08:32:43 php: : Resyncing configuration for all packages.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.
                                        Jan 24 08:32:43 php: : The Country Block package is missing required dependencies and must be reinstalled.

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Supermule Banned
                                          last edited by

                                          Furthermore after I reinstalled Country Block:

                                          Jan 24 09:07:57 php: /packages/countryblock/countryblock.php: The command 'rm -R /usr/local/www/packages/countryblock/lists' returned exit code '1', the output was 'rm: /usr/local/www/packages/countryblock/lists: No such file or directory'

                                          Despite seeing this in the logs, Country Block says it is running….

                                          countryblock.jpg
                                          countryblock.jpg_thumb

                                          1 Reply Last reply Reply Quote 0
                                          • T
                                            tommyboy180
                                            last edited by

                                            BETA 2.0 is hard to work on. It's changing often and I don't have the resources right now to actively work on it. Someone was supposed to send me a laptop for completing a bounty but that never happened.

                                            -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
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.