Jump to content



Photo
- - - - -

IP trap Version 3 released


  • Please log in to reply
310 replies to this topic

#1   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 08 July 2009 - 11:16

I am about to release version 3 of the IP Trap,
Updated features
Cleaned code,
Added a Whitelist, with Search engine IP numbers loaded
Redesigned the Blocked.php page.
Added correct syntax for robots.txt
Updated install file.

Any comments, questions first see the readme in the contribution then ask here.

http://addons.oscommerce.com/info/5914


Enjoy
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#2   rocdy

rocdy
  • Members
  • 152 posts
  • Real Name:Rocdy Dewanto
  • Gender:Male
  • Location:Jakarta

Posted 09 July 2009 - 05:26

I am about to release version 3 of the IP Trap,
Updated features
Cleaned code,
Added a Whitelist, with Search engine IP numbers loaded
Redesigned the Blocked.php page.
Added correct syntax for robots.txt
Updated install file.

Any comments, questions first see the readme in the contribution then ask here.

http://addons.oscommerce.com/info/5914


Enjoy
Nic


I have found this is good addon in version 2.1 but when i upgrade into version 3 it not working. I just tested and i find my ip have not banned when i type www.bnetb-tanahabang.com/personal two or three time. Any idea about this issue?
Rocdy

Beginner in php programming and still learning from this forums.
Special thanks for Oscommerce Community Forums that help me a lot. :-)

#3   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 07:27

I have found this is good addon in version 2.1 but when i upgrade into version 3 it not working. I just tested and i find my ip have not banned when i type www.bnetb-tanahabang.com/personal two or three time. Any idea about this issue?



Hi
I just tried it on you site and got myself banned ... it works!
I tried to load a few different pages and got the blocked.php page each time.
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#4   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 09 July 2009 - 09:27

Hi
I just tried it on you site and got myself banned ... it works!
I tried to load a few different pages and got the blocked.php page each time.
Nic

Hi Nic

I went to http://www.developme....net/j/personal
and did not get banned.
Used IE6 if that helps.


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#5   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 09:53

Hi Leslie
How are you, long time no hear!
The last few days i have has server issues, resulting in my host carrying out a set or restores, i noticce a few things have changed!

If you give it a moments then try it again please.

Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#6   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 09 July 2009 - 11:16

Hi Leslie
How are you, long time no hear!
The last few days i have has server issues, resulting in my host carrying out a set or restores, i noticce a few things have changed!

If you give it a moments then try it again please.

Nic

I still get the home page (tried several times in a row). Even tried FF with same result.


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#7   mr_absinthe

mr_absinthe
  • Members
  • 446 posts
  • Real Name:Alex
  • Location:London, UK

Posted 09 July 2009 - 12:36

Hi, same here, when I go to: http://www.developme....net/j/personal I get blocked.php, however I can still visit http://www.development-server.net/. However as far as I can tell, it works fine on my site. You can try it, Leslie: my store
Absinthe Original Liquor Store

#8   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 13:10

Hi, same here, when I go to: http://www.developme....net/j/personal I get blocked.php, however I can still visit http://www.development-server.net/. However as far as I can tell, it works fine on my site. You can try it, Leslie: my store


Hi
Thank you for the input, yes you would be able to see the root directory as the trap is set up in the "j" folder.
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#9   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 13:12

Hi Leslie,
I have had a look athe code once again, it all seems fine!
Whats yout IP number?
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#10   masterc00ps

masterc00ps
  • Members
  • 5 posts
  • Real Name:c00ps

Posted 09 July 2009 - 13:35

Just after installing I tested, and got the banned + the email reporting it.

But when going back to index.php I had access.

I checked IP_Trapped.txt for my ip address, and it wasn't there.

Worked out that it was a write permission problem, so CHMOD'd file to 666.

And all is now fine and working.

I may have missed it when installing, but don't remember see it, but hope it helps other to get it working.

c00ps

#11   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 13:44

Hi CooPs
I have a feeling i left that part out of the install file. it is in the early ones!
The permissions for the
banned / IP_Trapped.txt and the banned / Whitlist.txt sould be set to 666.
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#12   mr_absinthe

mr_absinthe
  • Members
  • 446 posts
  • Real Name:Alex
  • Location:London, UK

Posted 09 July 2009 - 13:49

Works fine on the"j" folder. On my site, it works fine with CHMOD 644 on both files, 755 on folder.
Absinthe Original Liquor Store

#13   azer

azer
  • Members
  • 842 posts
  • Real Name:azer
  • Location:Paris, france

Posted 09 July 2009 - 13:53

a question about the code
since secret.php is called from application_top.php
why don't we use configure.php variables for the various adress written in hardcode instead ?

{
header ('Location: http://www.yoursite.net/catalog/blocked.php');
exit;


could for instance use DIR_WS_HTTPS_CATALOG etc etc

tell me ?!
MS2

#14   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 14:15

a question about the code
since secret.php is called from application_top.php
why don't we use configure.php variables for the various adress written in hardcode instead ?

{
header ('Location: http://www.yoursite.net/catalog/blocked.php');
exit;


could for instance use DIR_WS_HTTPS_CATALOG etc etc

tell me ?!


I thought of this, its also able at present with a minor change, portable to non osC sites, so i decided it will be best like this
and you can drop your attitude thanks
Sometimes you're the dog and sometimes the lamp post

My Contributions

#15   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 16:11

To add more security, this will be in the next update.
For those on a Linux server add the following to prevent your banned / IP_Trapped.txt and your Whitelist.txt being visible when called for in a browser

Add

SetEnvIfNoCase Request_URI IP_Trapped\.txt ban
<Files ~ "^.*$">
order allow,deny
allow from all
deny from env=ban
</Files>

SetEnvIfNoCase Request_URI Whitelist\.txt ban
<Files ~ "^.*$">
order allow,deny
allow from all
deny from env=ban
</Files>



To your .htaccess file, the one inside your catalog folder.
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#16   azer

azer
  • Members
  • 842 posts
  • Real Name:azer
  • Location:Paris, france

Posted 09 July 2009 - 16:23

and you can drop your attitude


what do you mean ?

i was justing asking if it wouldnt be easier so people make no mistakes in the url with / and \ for instance
MS2

#17   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 16:48

tell me ?!


Maybe a languages thing, but that above is considered to be condescending here.
If it was not meant this way i apologise.

Personally i prefer to keep as is due to the fact it is easily ported to another style of code.

Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#18   FIMBLE

FIMBLE
  • Members
  • 6,604 posts
  • Real Name:Nic
  • Gender:Male

Posted 09 July 2009 - 16:53

I have been working with Isabella (Biancoblu) who has been testing this for me pre release, and post release, and has been an invaluable help.
She has an index solution that can be used to protect your banned folder which does not have an index.
I have given her access to the IP Trap uploads so maybe she will upload this to be included
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#19   azer

azer
  • Members
  • 842 posts
  • Real Name:azer
  • Location:Paris, france

Posted 09 July 2009 - 16:55

look at my racord it makes 5 years i m an active member here if i was condescending i would be out from oscommerce project since a long time..
no the ? is for the question and ! is to say if it works could be cool :-)

/wink.gif' class='bbc_emoticon' alt=';)' />
MS2

#20   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 09 July 2009 - 17:25

Hi CooPs
I have a feeling i left that part out of the install file. it is in the early ones!
The permissions for the
banned / IP_Trapped.txt and the banned / Whitlist.txt sould be set to 666.
Nic

Hi Nic

I wish to let you know the previous version worked for me. I can't get banned when I go to your new url.


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.