Jump to content


Photo

Block non us IP??


  • Please log in to reply
3 replies to this topic

#1 barkster

barkster
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 02 October 2006 - 06:53 PM

I know this isn't as easy as I would think but there has to be some solution out there??  Even if it isn't perfect.  How can I block on US(Arin) IP's on a linux server? 

I found this

164/8 - Europe
165/8 - Asian (Singapore)
43/8, 60/7, 202/7, 210/7, and 218/7 - Asia
62/8, 80/7, 82/8, 193/8, 194/7, 212/7, 217/8 - Europe
200/7 - Latin America

Could I just go into cpanel/IP Block Manager and put in something like
164.
165.
43.
60.
etc...


Thanks

#2 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 02 October 2006 - 07:24 PM

Why not use a IP database and plug it into the C API for Apache and then you can be sure to block all visitors that you do not want. There is many PHP, Perl and server based examples if you google for it, you should find what you need. It would be better than having a very big filter list that Apache has to run through with each request!

What I do, is have a IP database hooked into the C API of Apache, then when I get match it gets added to throttle system if they are under request limit control, or moved to the security filter that does not even listen to their request! If you want simple IP database tell me and I will give you one, with the scripts to use it!

me!

#3 barkster

barkster
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 02 October 2006 - 07:37 PM

I wouldn't mind looking at it, you can pm me for some reason it won't allow me.

#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 02 October 2006 - 08:16 PM

Please use email... PMs are disabled for normal users.

Info: PHP Manual





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users