SMF 2.0 forum Question: How to reset all member IP's to 127.0.0.1 or any IP

Started by Wellwisher, May 23, 2016, 02:12:31 PM

Previous topic - Next topic

Wellwisher

Hello,

I want to reset all members to a single IP on SMF 2.0. Nothing too drastic, just reset IP's on member posts and member profiles.
I have already removed all member passwords, messages for security by dropping them from the database.




I came across the following tutorial but it's for SMF 1.0 (OP LINK):

Open: Sources/QueryString.php and at the line 315 add:



   $_SERVER['HTTP_CLIENT_IP'] = '0.0.0.0';
   $_SERVER['REMOTE_ADDR'] = '0.0.0.0';
   $_SERVER['BAN_CHECK_IP'] = '0.0.0.0';



i'm looking for other places there is ip info (2 ip records exist at the members table but i think it's ok with the above lines addition)

then you must reset all post's related ips:



UPDATE `db_name`.`smf_messages` SET `posterIP` = '127.0.0.1' WHERE 1;


optionally if you want to delete all the ips recorded until now you must reset members ips



UPDATE `db_name`.`smf_members` SET `memberIP2` = '127.0.0.1' WHERE 1;
UPDATE `db_name`.`smf_members` SET `memberIP` = '127.0.0.1' WHERE 1;



and the ips recorded at the error logs



UPDATE `db_name`.`backup_smf_log_errors` SET `ip` = '0.0.0.0' WHERE 1;
UPDATE `db_name`.`smf_log_errors` SET `ip` = '0.0.0.0' WHERE 1;







Why you do this Wellwisher? :(

Basically I wish to make my SMF database publicly downloadable so members can have my forum on their local machines or carry it wherever they please (be it mounted on a bootable CD/ USB drive), it's a nobal gesture. It was an old project from years ago which I have no plans to revive and members can have it.


Arantor

Yup, that's the places you'd need to do it (the sessions and online log would naturally purge over time anyway), though any mod that adds their own will need to clean house too, e.g. SimpleDesk tracks IPs of people who posted helpdesk tickets/replies.

Wellwisher

Quote from: Arantor on May 23, 2016, 02:14:28 PM
Yup, that's the places you'd need to do it (the sessions and online log would naturally purge over time anyway), though any mod that adds their own will need to clean house too, e.g. SimpleDesk tracks IPs of people who posted helpdesk tickets/replies.

So do these instructions still work in Smf 2.0?

Also where do I add these code snippets:

UPDATE `db_name`.`smf_messages` SET `posterIP` = '127.0.0.1' WHERE 1;

I added them inside Myphpadmin, as SQL query or do I add them in SMF php file?

margarett

You are allowing the database to be downloaded, you should also truncate the tables Arantor mentioned.

These queries need to run in the "SQL" tab of phpmyadmin
The column names are a bit different in 2.0.

UPDATE smf_messages SET poster_ip = '127.0.0.1'
UPDATE smf_members SET member_ip = '127.0.0.1'
UPDATE smf_members SET member_ip2 = '127.0.0.1'
TRUNCATE smf_log_errors
TRUNCATE smf_sessions
TRUNCATE smf_log_online


And delete any table which doesn't start with "smf_"
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

I couldn't work out if this was a request for help or wanting to be moved to tips/tricks...

Wellwisher

Quote from: margarett on May 23, 2016, 07:55:24 PM
You are allowing the database to be downloaded, you should also truncate the tables Arantor mentioned.

These queries need to run in the "SQL" tab of phpmyadmin
The column names are a bit different in 2.0.

UPDATE smf_messages SET poster_ip = '127.0.0.1'
UPDATE smf_members SET member_ip = '127.0.0.1'
UPDATE smf_members SET member_ip2 = '127.0.0.1'
TRUNCATE smf_log_errors
TRUNCATE smf_sessions
TRUNCATE smf_log_online


And delete any table which doesn't start with "smf_"

Thank you @margarett, I am really excited to do this for our members!  8) This was a very old project of mine dating back 15+ years. We later moved to SMF and it was the fondation of our roots and it never let me down. I wasn't a programmer of any sorts at that time.  :P

I am in the process of writing an "about page" and some extra articles to accommodate my public db-release. Once that's done, I will finally be able to put this old project to rest and let others do as they please with it. It's emotional since a lot of time and effort had gone into this old forum. Thank you margarett.   :P

P.S @margarett another thing came to mind! Is it possible to reset member e-mails to one email?

@Arantor ought to be in tips and tricks too but sure I was in need of help.  8)

Illori

Quote from: Wellwisher on May 24, 2016, 02:54:39 PM

P.S @margarett another thing came to mind! Is it possible to reset member e-mails to one email?


SMF also uses the email address for login, so no that is not possible.

Wellwisher

Quote from: Illori on May 24, 2016, 03:06:26 PM
SMF also uses the email address for login, so no that is not possible.

It is possible. @Illori why you lie? :P Anywoo, I revisited this old project just now and checked member email addresses and lo and behold, I had already did this!  8) I can't see any member emails anywhere woot, woot! :laugh: I just don't remember how the hell did I do it, but I use to tinker around a lot when I was younger, its how I learn. ;D

Thank you everyone!

Illori

i did not lie, just because you did something did not mean it was smart thing or a good thing to do.

Wellwisher

Quote from: Illori on May 24, 2016, 03:48:35 PM
i did not lie, just because you did something did not mean it was smart thing or a good thing to do.

@Illori Omg, I asked if this was possible and you said no. https://www.youtube.com/watch?v=GM8cHrl5JN8

Jokes aside, I understand your concerns. For the record, I don't recommend anyone using any of these methods on live production sites. Not unless you know what you're doing.
My situation is different in that this modification is for a non-production forum which'll only be used as a "read only" forum (for reference purposes). That's its only purpose. Members may also want to add content and store it but again, I have outlined this db repo is not suitable for production.

Advertisement: