- Apr 25, 2015
- 1,845
- 2
- 2,199
- 327
Here is what you will want to do to clear IP logs from a XenForo install. This tutorial is going to rely on you using an SQL database.
REQUIREMENTS:
1. Have ROOT access to the box (server).
2. Have the database name, username, password for the database connection.
Make a bash script file (SSH in w/ PuTTY or whatever).
Copy the below and edit the user, password and database values to match yours:
Now of course save it in that ipwiper.sh file using either nano or vi!
Throw in the "pwd" command to find the directory your script is stored in. Then copy it, like "/path/to/script", then add "/ipwiper.sh" if that is what you named the bash script.
Go ahead and type "crontab -e" now and you're going to want to place this in. Make adjustments as necessary. This will happen every fifteen minutes:
In doing some testing, you may want to type just in case:
REQUIREMENTS:
1. Have ROOT access to the box (server).
2. Have the database name, username, password for the database connection.
Make a bash script file (SSH in w/ PuTTY or whatever).
Code:
touch ipwiper.sh
Copy the below and edit the user, password and database values to match yours:
Code:
#!/bin/bash
mysql --user=TYPE_USERNAME_HERE --password=TYPE_PASSWORD_HERE --database=TYPE_DATABASE_NAME_HERE --execute="Update xf_ip SET ip = '00'"
Throw in the "pwd" command to find the directory your script is stored in. Then copy it, like "/path/to/script", then add "/ipwiper.sh" if that is what you named the bash script.
Go ahead and type "crontab -e" now and you're going to want to place this in. Make adjustments as necessary. This will happen every fifteen minutes:
Code:
*/15 * * * * /path/to/script/ipwiper.sh
In doing some testing, you may want to type just in case:
Code:
chmod u+x ipwiper.sh
Last edited: