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

    Country Block

    Scheduled Pinned Locked Moved pfSense Packages
    691 Posts 79 Posters 768.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.
    • M
      mgc6288
      last edited by

      @jerrygoldsmith:

      Is there a way to auto-start it, or to keep it from needing to be restarted every time this happens?

      What I did is after I installed the Cron package, I created an auto start like this:

      minute: 0
      hour: *
      mday: *
      month: *
      wday: *
      who: root
      command: /usr/local/etc/rc.d/countryblock.sh

      1 Reply Last reply Reply Quote 0
      • J
        jerrygoldsmith
        last edited by

        Thanks guys, I appreciate it.

        Like I said, I don't know if it's the IP change but it seems to happen about that time.  I put in the cron job, thanks a bunch!

        And thanks again for the wonderful package and all the hard work you put into it!

        1 Reply Last reply Reply Quote 0
        • deltaendD
          deltaend
          last edited by

          tommyboy180, when Traffic Shaping and country block are installed on the same pfsense firewall, it causes a 404 to be displayed when you attempt to view the traffic shaping panel and Country Block fails to run with an invalid syntax error.

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

            @deltaend:

            tommyboy180, when Traffic Shaping and country block are installed on the same pfsense firewall, it causes a 404 to be displayed when you attempt to view the traffic shaping panel and Country Block fails to run with an invalid syntax error.

            I found a quick fix and will be pushing an update soon.

            -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
            • deltaendD
              deltaend
              last edited by

              I love you.

              1 Reply Last reply Reply Quote 0
              • J
                jsmwalker
                last edited by

                Hi there,

                Great package, just wanted to check which interfaces this creates the rules on?

                Cheers

                J

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

                  Heyy Tommy….:) Was I spot on or what??? :D

                  See ya ;)

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

                    @jsmwalker:

                    Hi there,

                    Great package, just wanted to check which interfaces this creates the rules on?

                    Cheers

                    J

                    This affects all interfaces.

                    -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
                    • J
                      jward
                      last edited by

                      Hi Tommy, this is a really great package - thanks for putting time into developing it! ;D

                      If possible in some future release it would be great to be able to apply the country block settings per interface, even better if it could be down to the Virtual IP level.  I'm sure like many others, we have various services running on different Virtual IPs, some need to be open to the world, but others could be very heavily limited to 1 or 2 countries so being able to block countries down to the Virtual IP level would really help.

                      Thanks again,
                      Jon

                      Jonathan Ward
                      pfSense 1.2.3 - HP DL360 G4

                      1 Reply Last reply Reply Quote 0
                      • J
                        jroberts31xray
                        last edited by

                        (if im posting in the wrong area just let me know)

                        Thanks Tommy for a great package, i am a huge fan and it and deployed this on every firewall i build…....ok now of for the question ;D

                        i have a Dell power edge 1850 dual xeons 3.0's and 2g ram and about 35gb of disk space running 1.2.3. Release.  (Mind you this is first time i have seen this) We had the original config for this on a "Alix" board and just moved the config file over to the larger servers on a fresh install.

                        Issue: Committing the country's to the block list is fine however when i Enable Country Block i receive the following error:

                        Current Status = NOT running
                        /tmp/rules.debug:44: syntax error
                        You are blocking 0 Networks

                        if anyone in the community has any ideas please let me know....Thanks again.....

                        Image Below.

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

                          @jroberts31xray:

                          (if im posting in the wrong area just let me know)

                          Thanks Tommy for a great package, i am a huge fan and it and deployed this on every firewall i build…....ok now of for the question ;D

                          i have a Dell power edge 1850 dual xeons 3.0's and 2g ram and about 35gb of disk space running 1.2.3. Release.  (Mind you this is first time i have seen this) We had the original config for this on a "Alix" board and just moved the config file over to the larger servers on a fresh install.

                          Issue: Committing the country's to the block list is fine however when i Enable Country Block i receive the following error:

                          Current Status = NOT running
                          /tmp/rules.debug:44: syntax error
                          You are blocking 0 Networks

                          if anyone in the community has any ideas please let me know....Thanks again.....

                          Image Below.

                          Just to make sure do you have the latest version of countryblock installed?
                          Also what other pages are you running? Traffic shaping?

                          -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
                          • J
                            jroberts31xray
                            last edited by

                            Version 0.1.4 on the C.B. and i am not running shaping, packages listed below: btw we are running the FW transparent.

                            Package Name  Category  Package Version
                            Country Block Firewall 0.1.4
                            Dashboard System         0.8.8
                            IP-Blocklist Firewall         0.2.2

                            thanks for the FAST reply.    ;)

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

                              Then its not a firewall any more and doesnt do any blocking….;)

                              1 Reply Last reply Reply Quote 0
                              • J
                                jroberts31xray
                                last edited by

                                We got it…thanks again Tommy, great package.

                                it was a bad config file......Thanks

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

                                  @jroberts31xray:

                                  We got it…thanks again Tommy, great package.

                                  it was a bad config file......Thanks

                                  Thank you for your support!

                                  -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
                                  • J
                                    jroberts31xray
                                    last edited by

                                    Yup….NP  the config was from an embedded alix board and did not work when imported to a full hardware install..........from what i am told its a "Known" issue. Your package is awesome and it does the Job 100%! thanks again. The folks here at Bluegrassnet appreciate it!

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      kilthro
                                      last edited by

                                      i wanted to say thanks for this package!!! its fantastic. This package is what got me introduced to pfsense since i needed something to block all of china and korea from my web servers. I have it added to cron to make sure it runs all the time as well.

                                      I did have a question, is there any way to have this package to show up on the services screen?

                                      I have that widget added to my main log in (dashboard) page on 2.0 and it would be good to see right there if it is running or not.

                                      Just thought I would ask.

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

                                        @kilthro:

                                        i wanted to say thanks for this package!!! its fantastic. This package is what got me introduced to pfsense since i needed something to block all of china and korea from my web servers. I have it added to cron to make sure it runs all the time as well.

                                        I did have a question, is there any way to have this package to show up on the services screen?

                                        I have that widget added to my main log in (dashboard) page on 2.0 and it would be good to see right there if it is running or not.

                                        Just thought I would ask.

                                        It's not really a service that is running to block the countries, so having this package show up in the services will not be possible. The way it works is by basically injecting a couple lines of deny rules to your fw config so being able to track the current status of the package will have to be done via other means. If you know php I would love the extra help!
                                        There are still many changes to come and I haven't forgotten about that update deltaend!
                                        I do appreciate the support, so thank 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
                                        • T
                                          tci
                                          last edited by

                                          I have a wierd problem. I selected 12 countries, all of spammers list + Barbados + Italy. Whenever I return to the list once saved, Barbados is never selected but it is being blocked.
                                          Status says Currently 12 of 246 selected.

                                          Using Chrome. Anything i'm doing wrong or is it a bug?

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

                                            Version 1.5 Released

                                            Changes:

                                            • Added embedded compatibility.

                                            • Verified working with traffic shaping settings

                                            • Added interface choices - just for you jward!

                                            • Fixed bug with country Barbados - Thank you tci!

                                            Warning: You need to select the interfaces that this will apply to before you run it. I Highly Recommend selecting all interfaces.
                                            If you run into a problems let me know.
                                            deltaend: I fixed the 404 problem and tested pfsense w/ traffic shaping. I was able to have it working w/ traffic shaping enabled so let me know if you run into any problems.

                                            Thank you all for your patience with updates.

                                            1.5.jpg
                                            1.5.jpg_thumb

                                            -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.