The pfSense Store

Author Topic: Country Block  (Read 119949 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
Re: Country Block
« Reply #165 on: September 27, 2010, 05:50:05 am »
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
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here

Offline tci

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #166 on: September 27, 2010, 07:11:44 am »
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?

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #167 on: September 29, 2010, 04:04:46 am »
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.
« Last Edit: September 29, 2010, 04:08:28 am 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 jward

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #168 on: September 29, 2010, 06:59:47 am »
Thanks Tommy, will take a look.
Jonathan Ward
pfSense 1.2.3 - HP DL360 G4

Online Supermule

  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +2/-1
    • View Profile
Re: Country Block
« Reply #169 on: September 29, 2010, 09:50:14 am »
Aint this a wrong path for the new 0.1.5 edition of Country block??

 /usr/local/etc/rc.d/countryblock.sh

I use this...

/usr/local/www/packages/countryblock/countryblock.sh 

Thanks for all your help. :)

I did your suggestion with the uncheck Bogon and added the cron package and applied the command you specified. All seems to be working well with the Country Block package now. I rebooted my firewall and all came up ok. I did notice I could access some Chinese websites with extensions of .cn

Does the Country Block work for both IP's and DNS naming or just IP?

A On the cron job I made the new job entry with this criteria and maybe you have some suggestions or minor tweaks to it.

Cron Job:

Minute: 0
Hour: *
Mday: *
Month: *
Wday: *
Who: root
Command:  /usr/local/etc/rc.d/countryblock.sh


Kind regards Brian


Offline Bai Shen

  • Full Member
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #170 on: September 29, 2010, 10:09:33 am »
How does one update a package in pfSense?  Is it automatic or do I need to do something?

Offline mgc6288

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #171 on: September 29, 2010, 05:05:36 pm »
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.

Hmm.  I updated and now it won't start.  I do have a red error message stating "Warning! No Interfaces Selected Click" and yet when I click the box I get a 404 requesting a link to hxxp://xxx.xxx.xxx.xxx/packages/countryblock/countryblock_if.php which doesn't exist..  Is there a different page I go to select which interface?  Like you recommended, I'm fine with all of them for now.  I just checked the directory packages\countryblock and I do not see a countryblock_if.php file listed there.

Having an individual log just for this would be awesome though some day - no rush - volunteer work is always outstanding.  Thanks dude - this package really has been well worth the pfsense experience.
« Last Edit: September 29, 2010, 05:15:06 pm by mgc6288 »

Offline XIII

  • Sr. Member
  • ****
  • Posts: 582
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #172 on: September 29, 2010, 05:31:53 pm »
+1 on the interface issue, does it still work without selecting one?

Thanks for the work tommyboy180
-Chris Stutzman
Sys0:2.0.1: AMD Sempron 140 @2.7 1024M RAM 100GHD
Sys1:2.0.1: Intel P4 @2.66 1024M RAM 40GHD
freedns.afraid.org - Free DNS dynamic DNS subdomain and domain hosting.
Check out the pfSense Wiki

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #173 on: September 29, 2010, 06:20:29 pm »
Supermule
  • It's "/usr/local/etc/rc.d/countryblock.sh"   "countryblock/countryblock.sh" does not exist. If you are making a cron job then use "/usr/local/etc/rc.d/countryblock.sh"

To update the package
  • Go to installed packages and uninstall countryblock
  • Now go to the main packages page and install countryblock

mgc6288
  • uninstall countryblock completely and re-install

XIII
  • Thank you!
  • It does not work without selecting your interfaces, I will be pushing 1.6 tonight to tomorrow morning to address this
-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 tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #174 on: September 30, 2010, 03:29:27 am »
Version 1.6 is now available!

Changes:
  • All interfaces are selected/applied by default (no action required by users)
  • Modified Usage description to be more verbose

To upgrade uninstall countryblock and re-install.
-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

Online Supermule

  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +2/-1
    • View Profile
Re: Country Block
« Reply #175 on: September 30, 2010, 04:45:53 am »
Just an idea.....

Why not sort the countries in their respective part of the world instead?

Like Europe, North America, South America, Asia asf....The 7 continents. Thereby making it a lot easier to search and block.
Kind regards Brian


Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #176 on: September 30, 2010, 05:07:55 am »
Just an idea.....

Why not sort the countries in their respective part of the world instead?

Like Europe, North America, South America, Asia asf....The 7 continents. Thereby making it a lot easier to search and block.

Thank you for the suggestion! Alphabetically is the most efficient way to sort a huge list, it's sort of a defacto standardization that I think everyone has become accustomed to. It's also easier to maintain a large list like this in this order. I will note this for a future release.
Keep the suggestions coming!
-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 jward

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #177 on: September 30, 2010, 06:37:09 am »
Hi Tommy,

I've got some ideas for the UI and process flow that might help - let me know if you're interested and I'll put some mock-up screens together.

Jon.
Jonathan Ward
pfSense 1.2.3 - HP DL360 G4

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: Country Block
« Reply #178 on: September 30, 2010, 07:55:21 am »
Hi Tommy,

I've got some ideas for the UI and process flow that might help - let me know if you're interested and I'll put some mock-up screens together.

Jon.

I am very interested, let's see what you have in mind.
-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 NoahVail

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Country Block
« Reply #179 on: September 30, 2010, 08:10:39 am »
Quote
mgc6288
  • uninstall countryblock completely and re-install

That fixed it for me.
Thanks.
NV