View Full Version : Mini Mods - Delete IPs within a certain interval
Patria
02-01-2007, 10:00 PM
Description:
The script deletes the IP adresses within the following tables: adminlog, moderatorlog, post, threadrate, user. It doesnt remove the banned IPs (vBulletin Options, User Banning Options, Banned IP Addresses).
Installation:
1) Upload deleteip.php to /includes/cron
2) Login into your AdminCP
3) Go to Scheduled Tasks, Add New Scheduled Task
Varname: deleteip
Title: Delete IPs
Description: Delete IPs within a certain interval.
Log Phrase: Delete IPs
Set Interval.
Filename: ./includes/cron/deleteip.php
Product: vBulletin
Update Instructions:
Replace the file deleteip.php.
History:
Version 1.01: Cron Logging - log_cron_action() added.
Version 1.02: Speed Improvement - Significantly faster without the conditionals.
Version 1.03: Added conditionals again to decrease the database load.
cygy2k
02-03-2007, 12:40 AM
Can you explain the benefit of this? I'm sure there must be one but I'm unaware of it.
thincom2000
02-03-2007, 03:48 AM
I think it's just to reduce the size of your database...
Patria
02-03-2007, 09:02 AM
Can you explain the benefit of this?You support your members to protect their privacy.
If you turn off the IP Address Log within vBulletin - AdminCP, Message Posting and Editing Options, Log IP Addresses, vBulletin still logs the IP Addresses in several other tables except the post table and the IP Addresses are still held in your database from the time before you put down the switch.
Why would someone turn off the IP address logging?
For security and privacy reasons.
Three Scenarios
Copyright Violation: A member posted a direct link to Disneys current movie and Disney asks you for the IP address of the user? You could say sorry, we do not log IP addresses to protect the privacy of our members.
Free Speech: A member posted something your goverment doesnt like and they ask you for the IP address of the user? You could say sorry, we do not log IP addresses to protect the privacy of our members.
Data Theft: Someone hacked your server and does a mysqldump, with the IP addresses he could easily run all IP addresses against a Geolocation database and sell it to markting companies or use it to uncover your members together with the email addresses.
You simply dont have what they try to get. You should also delete your webserver logs within a certain interval and instruct your members to use suitable email providers. Or use secure proxies in general which usual user doesnt do.
SCRIPT3R
02-03-2007, 06:28 PM
Excellent... i've always done this manually.
Hornstar
02-04-2007, 03:40 AM
Thanks for sharing the benefits, it now makes more sense, Just one question, If I have a member who I wnat to ban by IP, how will I know what his IP is?
Patria
02-04-2007, 11:03 AM
Thanks for sharing the benefits, it now makes more sense, Just one question, If I have a member who I wnat to ban by IP, how will I know what his IP is?You still see the IP address via Who's Online (online.php) and you could control the deletion interval of course.
JKelleyus
02-22-2007, 09:58 PM
I'm curious about this....
I run a somewhat controversial local politics forum where people have become upset and threatened to sue members for their posts.
What effect does deleting the IP's have on vB as a whole? Will it mess with the polling (if enabled for guests)? If I process server logs for statistical data, and then run the cron job, will my stats still be valid (I try and maintain a 7 day stat that includes geo-location by IP)?
Thanks for any answers...
Jake
Patria
02-22-2007, 11:22 PM
What effect does deleting the IP's have on vB as a whole?No effect, vBulletin still dont know the IPs of the members.
Will it mess with the polling (if enabled for guests)? I dont know how vBulletin handles polls regarding to guests. Backup your database and run the script. ;)
If I process server logs for statistical data, and then run the cron job, will my stats still be valid (I try and maintain a 7 day stat that includes geo-location by IP)?
The script is only responsible for vBulletin, the vBulletin database. Your Webserver logs are independent and the script wouldnt touch them. If you like to remove the logs you need to setup a additional linux cron job - the cron job mention by this plugin means vBulletin cron jobs (Scheduled Tasks).
ZomgStuff
02-22-2007, 11:39 PM
Reserved.
salata
03-25-2007, 04:57 AM
awesome. do you have any idea how i can make this work for 3.5.4? i tried and i get errors
Patria
03-31-2007, 10:41 PM
awesome. do you have any idea how i can make this work for 3.5.4? i tried and i get errorsWhat kind of errors?
salata
04-01-2007, 02:39 AM
What kind of errors?
thanks for responding. Its ok now, i wasnt able to get it to work. But i figured out how to delete them manually just by putting a query in, so i'll just stick with that. i didnt want to complicate things, as this was made for 3.6. great mod though!! i'll be using this for another board i am a admin at :)
Patria
04-08-2007, 01:21 PM
thanks for responding. Its ok now, i wasnt able to get it to work. But i figured out how to delete them manually just by putting a query in, so i'll just stick with that. i didnt want to complicate things, as this was made for 3.6. great mod though!! i'll be using this for another board i am a admin at :)Dont forget to press install (Mark as Installed). ;)
Masala4india
04-22-2007, 12:49 PM
Could you please tell the manual way to delete the IP addresses coz i want to see how many IP's are stored.
Sparticus_V2
04-25-2007, 06:10 PM
here is a question, I used this to delete the logs off all the proxy servers that had been used... But just to save time i deleted all intervals, and i figured the true IPs should start showing up as the members logged in... But now no IPs store in the user info section and I want them to, I deleted the Cron, what else must i do? I NEED TO KNOW THE IPs!!
Patria
04-26-2007, 06:54 PM
Could you please tell the manual way to delete the IP addresses coz i want to see how many IP's are stored.Execute the following lines via PhpMyAdmin for example.
UPDATE adminlog SET ipaddress = ''
UPDATE moderatorlog SET ipaddress = ''
UPDATE post SET ipaddress = ''
UPDATE threadrate SET ipaddress = ''
UPDATE user SET ipaddress = ''
here is a question, I used this to delete the logs off all the proxy servers that had been used... But just to save time i deleted all intervals, and i figured the true IPs should start showing up as the members logged in... But now no IPs store in the user info section and I want them to, I deleted the Cron, what else must i do? I NEED TO KNOW THE IPs!!If you want to delete the IPs except the IPs in the user info section you should remove the following line:
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ipaddress = ''");
from the deleteip.php.
Sparticus_V2
04-26-2007, 08:25 PM
if i have already run it, and the IPs are no longer comming back, what can i do to have the IPs start being collected agin in the Database?
Patria
04-27-2007, 04:28 AM
if i have already run it, and the IPs are no longer comming back, what can i do to have the IPs start being collected agin in the Database?You dont need to do something because vB logs the IPs. The plugin only remove the IPs within the specified interval. If you want get the IPs from the User Info dialog back you need to restore you database backup (in detail it would be enough to restore the user table).
accessdeniedzzz
04-27-2007, 03:35 PM
thnaks,
we still need sush addons for users privacity
Sparticus_V2
04-27-2007, 07:35 PM
well, for some reason even after I disabled the Cron, the IPs are not being logged and will not show up for IP searches....
rabbits slayer
05-08-2007, 05:09 AM
Nice mod. Installed. :)
Patria
05-12-2007, 12:21 PM
well, for some reason even after I disabled the Cron, the IPs are not being logged and will not show up for IP searches....If you removed the cron job the IPs should appear again for new registered users.
great mod installed
I still added this the line in deleteip.php
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "search SET ipaddress = '' WHERE ipaddress <> ''");
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.