The pfSense Store

Author Topic: Country Block  (Read 119933 times)

0 Members and 1 Guest are viewing this topic.

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Country Block
« on: June 04, 2010, 12:55:34 pm »
With CountryBlock you can block any country you want at the Firewall level. You can optionally block access to as well as access from.

Info:
This package uses pf (pfctl) to block country CIDR ranges pulled from http://www.countryipblocks.net/. Each CIDR range is added to a list and processed as a pf table. The table will automatically be added to your Firewall in the background. By default all traffic originating from your selected countries will be blocked. You can can also block access to these countries.
Tested on 1.2.2, 1.2.3, and 2.0 with FF and Chome. IE not supported.

Version:
2.4

Version Highlights:
Blocked countries are applied on start-up
cron job compatible
Option to log attempts
Option to block or allow outbound access
Select all countries checkbox
Option to specif interfaces
Total number of blocked networks is reported
Whitelist CIDR range

Limits:
IE does not work with this package.

How to:
1. First select the countries you want to block and if you want to block outbound access or log attempts as well.
2. Press "Commit Countries"
3. Enable the package and press "Save/Update"

FAQ:
Q: How do I know if the list got applied?
A: The package web interface will display the current status.

Q: I have the "Enable" check box checked but I don't think its blocking any Countries.
A: Any Errors will be at the bottom of the page when you press Save/Update

Q: I just want to block countries that SPAM the most.
A: The first list includes the Top SPAM'ing countries.

Q: How do I update the countries?
A: Press "Save/Update" - keep in mind that countries ranges RARELY change, therefore updating is not necessary.

Q: I think I can improve your package or add features, how can I help?
A: Send me a PM

For troubleshooting see: http://forum.pfsense.org/index.php/topic,25732.msg166474.html#msg166474
« Last Edit: October 02, 2011, 11:39:25 pm by tommyboy180 »
-Tom Schaefer
SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here

Offline Supermule

  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +2/-1
    • View Profile
Re: Country Block
« Reply #1 on: June 04, 2010, 01:12:02 pm »
That is just SO nice!!!!

Thx Tom for all your hard work and dedication to PFSense and making it a lot easier to be an network admin!! :)

Keep up the good work..... If yhou end up in Denmark by mistake some day, give me a call.....I would be happy to sponsor a shitload of beer.....:D
Kind regards Brian


Offline g4m3c4ck

  • Full Member
  • ***
  • Posts: 126
  • Karma: +0/-0
  • He got a real pretty mouth ain't he?
    • View Profile
Re: Country Block
« Reply #2 on: June 04, 2010, 05:20:38 pm »
Wow Tom exactly what pfsense needs!

Offline killervette

  • Jr. Member
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #3 on: June 04, 2010, 06:24:13 pm »
Will there be a way to only ALLOW certain countries and deny all others?

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #4 on: June 05, 2010, 08:39:08 am »
Will there be a way to only ALLOW certain countries and deny all others?

I will add a 'check all box' that way you can check all countries and remove the ones you want to allow.
-Tom Schaefer
SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here

Offline killervette

  • Jr. Member
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #5 on: June 06, 2010, 01:12:14 pm »
great!  any eta on a release?

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #6 on: June 07, 2010, 10:46:51 am »
Soon. (Less than 2 days)

I have a stable working version that I am testing now.
-Tom Schaefer
SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here

Offline mastablastaz

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #7 on: June 08, 2010, 04:18:33 pm »
great package idea!

Offline Supermule

  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +2/-1
    • View Profile
Re: Country Block
« Reply #8 on: June 09, 2010, 02:48:25 am »
Has the package been made available for PFsense users via the webgui for install??
Kind regards Brian


Offline simby

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #9 on: June 09, 2010, 09:05:42 am »
an info, for pfsense 2.0? when can we DL?

Offline killervette

  • Jr. Member
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #10 on: June 09, 2010, 04:15:48 pm »
will this run on 2.0 beta?  can i block all countries except the US without running into performance/memory issues running an ALIX board?

Offline Supermule

  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +2/-1
    • View Profile
Re: Country Block
« Reply #11 on: June 09, 2010, 04:18:35 pm »
Forget I said anything..... ::) :D Mixed up the DNS Blacklist package with the Countryblock package.......

will this run on 2.0 beta?  can i block all countries except the US without running into performance/memory issues running an ALIX board?
« Last Edit: June 10, 2010, 04:07:24 am by Supermule »
Kind regards Brian


Offline killervette

  • Jr. Member
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #12 on: June 09, 2010, 05:32:18 pm »
Use the whitelist feature instead ;)

will this run on 2.0 beta?  can i block all countries except the US without running into performance/memory issues running an ALIX board?

Im new with pfsense.  Is whitelist a feature in country block? I have not installed it yet since I am on 2.0 beta and wasnt sure if it will work.

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #13 on: June 09, 2010, 05:45:25 pm »
will this run on 2.0 beta?  can i block all countries except the US without running into performance/memory issues running an ALIX board?

If you are running embedded you may; by that I mean I don't test on embedded if that is what you run. As far as ALIX goes you should have almost 0 performance interference from this package.

This will run on 2.0, 32bit and 64bit. Hopefully a package commit will be completed here soon.
-Tom Schaefer
SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here

Offline killervette

  • Jr. Member
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #14 on: June 09, 2010, 07:56:29 pm »
So a new guy question, where do i go to install it.  I dont see it in my 1.2.3 package list.