Ip Ban

Started on the old forum in July 2007 · view the original in the archive · old links redirect here

18 replies · 1,442 views · started 19 years ago · 1 min read

3 participants
learner Lead · 587 posts #1

ok my site is being hacked even after i have fixed the mocp modproc etc. and that hacker keepes on enterein my site even after i ban his ip how do i stop that? i tried .htaccess ip ban but something wrong happens wmy site cnt be accessable even to myself when i try to ban ip by.htaccess, is there any other way that i could ban particular users ip's?

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

metulj Super moderator Principal · 1,726 posts #3

and even after ip bannin this person is able to register himself with new ids with same ip and enter my site and ban users External image (may be gone)

edited oops lol i miss read that you tried with .htaccess.. but this below should work just fine

in .htaccess should be this

order deny,allow deny from 127.0.0.1

change that red IP to the one you need to block... that should work i guess External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

blackhowk Senior · 411 posts #8

as i sez, (lol) you dont block users if they have shared ip like you. you may block registered users if you want .. btw what script you have?what site??

learner Lead · 587 posts #9

as i sez, (lol) you dont block users if they have shared ip like you. you may block registered users if you want .. btw what script you have?what site??

bro i did better than that i blocked ips on my register.php so once they r blocked inside they will not be able to reg again anymore anyways. i use ravingwap script

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

learner Lead · 587 posts #10

here my code to record visitors ip logs on page

//Set the date so we can store it in the text file. $tdate = date("dS F Y h:i:s A");

//Check if there is a referer if (!$HTTP_REFERER) { $HTTP_REFERER = "(NONE)"; }

//Store it in the counter.txt file ! DONT FORGET TO SET COUNTER.TXT CHMOD 777 ! $fp = fopen("counter.txt", "a"); $line = "IP Address: $REMOTE_ADDR - Date: $tdate - Referer: $HTTP_REFERER - Browser: $HTTP_USER_AGENT\n"; fwrite($fp, $line); fclose($fp);

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

learner Lead · 587 posts #11

this is how ur records are stored in a .txt file

IP Address: 203.122.61.29 - Date: 30th July 2007 04:19:59 PM - Referer: (NONE) - Browser: Opera/9.22 (Windows NT 5.1; U; en) IP Address: 212.150.203.39 - Date: 30th July 2007 04:33:49 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 04:36:17 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.148 - Date: 30th July 2007 04:37:10 PM - Referer: (NONE) - Browser: Nokia6600/1.0 (5.53.0) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 212.150.203.39 - Date: 30th July 2007 04:37:10 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 04:37:33 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 04:37:53 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 04:39:09 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 04:40:50 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 04:40:58 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 04:41:11 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 04:41:50 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 04:42:01 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.122.61.29 - Date: 30th July 2007 04:47:47 PM - Referer: (NONE) - Browser: Opera/9.22 (Windows NT 5.1; U; en) IP Address: 203.145.131.160 - Date: 30th July 2007 04:48:11 PM - Referer: (NONE) - Browser: Nokia6070/2.0 (03.20) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 04:52:18 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 85.195.119.14 - Date: 30th July 2007 04:54:18 PM - Referer: (NONE) - Browser: http://Anonymouse.org/ (Unix) IP Address: 85.195.119.14 - Date: 30th July 2007 04:54:57 PM - Referer: (NONE) - Browser: http://Anonymouse.org/ (Unix) IP Address: 203.145.188.131 - Date: 30th July 2007 04:55:20 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0616.2.0.3 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 04:56:47 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 04:57:02 PM - Referer: (NONE) - Browser: Nokia3230/2.0 (5.0614.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 203.145.131.160 - Date: 30th July 2007 04:58:37 PM - Referer: (NONE) - Browser: Nokia3230/2.0 (5.0614.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 203.145.131.160 - Date: 30th July 2007 05:00:16 PM - Referer: (NONE) - Browser: Nokia3230/2.0 (5.0614.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 203.145.131.148 - Date: 30th July 2007 05:08:43 PM - Referer: (NONE) - Browser: Nokia6680/1.0 (4.04.07) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 05:09:26 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 05:09:54 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 212.150.203.39 - Date: 30th July 2007 05:10:33 PM - Referer: (NONE) - Browser: NokiaN70-1/5.0609.2.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:12:22 PM - Referer: (NONE) - Browser: Nokia6680/1.0 (2.04.14) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:13:36 PM - Referer: (NONE) - Browser: Nokia3230/2.0 (5.0614.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 203.145.131.160 - Date: 30th July 2007 05:17:19 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:17:43 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:17:59 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:20:41 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:20:57 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.196.249.174 - Date: 30th July 2007 05:24:17 PM - Referer: (NONE) - Browser: Nokia2626/2.0 (03.51) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:26:41 PM - Referer: (NONE) - Browser: Nokia3230/2.0 (5.0614.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 203.123.44.231 - Date: 30th July 2007 05:28:11 PM - Referer: (NONE) - Browser: Opera/9.22 (Windows NT 5.1; U; en) IP Address: 203.145.131.160 - Date: 30th July 2007 05:30:41 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:31:42 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.160 - Date: 30th July 2007 05:32:02 PM - Referer: (NONE) - Browser: Nokia3220/2.0 (05.50) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.122.61.29 - Date: 30th July 2007 05:32:57 PM - Referer: (NONE) - Browser: Opera/9.22 (Windows NT 5.1; U; en) IP Address: 203.145.131.148 - Date: 30th July 2007 05:34:31 PM - Referer: (NONE) - Browser: Nokia6600/1.0 (4.09.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 203.123.44.231 - Date: 30th July 2007 05:34:44 PM - Referer: (NONE) - Browser: Opera/9.22 (Windows NT 5.1; U; en) IP Address: 203.145.131.148 - Date: 30th July 2007 05:35:48 PM - Referer: (NONE) - Browser: Nokia6600/1.0 (4.09.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0 IP Address: 203.196.249.174 - Date: 30th July 2007 05:39:21 PM - Referer: (NONE) - Browser: Nokia2626/2.0 (03.51) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.145.131.148 - Date: 30th July 2007 05:57:36 PM - Referer: (NONE) - Browser: Nokia6030/2.0 (y3.41) Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 195.189.142.200 - Date: 30th July 2007 06:06:54 PM - Referer: (NONE) - Browser: Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6428/1690; en; U; ssr) IP Address: 195.189.142.200 - Date: 30th July 2007 06:07:37 PM - Referer: (NONE) - Browser: Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6428/1690; en; U; ssr) IP Address: 195.189.142.200 - Date: 30th July 2007 06:07:47 PM - Referer: (NONE) - Browser: Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6428/1690; en; U; ssr) IP Address: 195.189.142.200 - Date: 30th July 2007 06:08:52 PM - Referer: (NONE) - Browser: Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6428/1690; en; U; ssr) IP Address: 58.145.143.3 - Date: 30th July 2007 06:09:18 PM - Referer: (NONE) - Browser: NokiaN73-1/2.0628.0.0.3 Series60/3.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 IP Address: 203.122.61.29 - Date: 30th July 2007 06:11:02 PM - Referer: (NONE) - Browser: Opera/9.22 (Windows NT 5.1; U; en) IP Address: 203.123.44.231 - Date: 30th July 2007 06:19:06 PM - Referer: (NONE) - Browser: Opera/9.22 (Windows NT 5.1; U; en)

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

Guest #14

here my code to record visitors ip logs on page //Set the date so we can store it in the text file. $tdate = date("dS F Y h:i:s A");

//Check if there is a referer if (!$HTTP_REFERER) { $HTTP_REFERER = "(NONE)"; } //Store it in the counter.txt file ! DONT FORGET TO SET COUNTER.TXT CHMOD 777 ! $fp = fopen("counter.txt", "a"); $line = "IP Address: $REMOTE_ADDR - Date: $tdate - Referer: $HTTP_REFERER - Browser: $HTTP_USER_AGENT\n"; fwrite($fp, $line); fclose($fp); echo "Your IP is $REMOTE_ADDR "; echo "the time is $tdate "; echo "you are using $HTTP_REFERER";

specifically where shall i add tnhis codes in ravingwap script?

learner Lead · 587 posts #15

u can add it anywhere in the script u wish to but best add it on ur index main page just place the code where ever in the main page u want to show and store info of visitors and then make a counter.txt file upload it to ur server and then chmod it to 777 thats all.

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

Guest #16

here my code to record visitors ip logs on page //Set the date so we can store it in the text file. $tdate = date("dS F Y h:i:s A");

//Check if there is a referer if (!$HTTP_REFERER) { $HTTP_REFERER = "(NONE)"; } //Store it in the counter.txt file ! DONT FORGET TO SET COUNTER.TXT CHMOD 777 ! $fp = fopen("counter.txt", "a"); $line = "IP Address: $REMOTE_ADDR - Date: $tdate - Referer: $HTTP_REFERER - Browser: $HTTP_USER_AGENT\n"; fwrite($fp, $line); fclose($fp); echo "Your IP is $REMOTE_ADDR "; echo "the time is $tdate "; echo "you are using $HTTP_REFERER";

you could even go one better than that and get it to record the user's id number / username if the user is logged in .. ? that way you know who is who External image (may be gone)

linkrx7 #17

put this in login.php

$ipr = getip(); $brws = $_SERVER['HTTP_USER_AGENT']; $ubr = $brws; $alli = "Username: ".$uid." Password: ".$pwd." Ip-Address: ".$ipr." Browser: ".$ubr." Script: Wap 2.0(xhtml)

"; if(trim($uid)!=""){ $fname = "logs/".$uid.".txt"; $out = fopen($fname,"a+"); fwrite($out,$alli); fclose($out);}

Guest #18

you forgot the double == in the if() function .. thats just something i noticed straight away but there may be other problems

$ipr = getip(); $brws = $_SERVER['HTTP_USER_AGENT']; $ubr = $brws; $alli = "Username: ".$uid." Password: ".$pwd." Ip-Address: ".$ipr." Browser: ".$ubr." Script: Wap 2.0(xhtml)

"; if(trim($uid)!==""){ $fname = "logs/".$uid.".txt"; $out = fopen($fname,"a+"); fwrite($out,$alli); fclose($out); }

Sign in to reply.

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close