XF 1.1 Manual Add & Update Banned IP's


Active member
Hey All,

We recently added the registration timer plug-in to our Xenforo installation and we thing it's working great so far. I noted that since the plug-in keeps a log of all blocks it completes; I might be able to use that.

I would like to have a script run that takes any offending IP address that have attempted to many times during a set period; and auto add them to the Blocked IP's list.

Here is what I know:
  1. I should be able to run the query via PHP and enter that the results into an array.
  2. With PHP I can then Update xf_ip_match with the data in said array.
Here is what i need to know:
  1. What is the user experience when Banned? Do they get to an Error page, or are they told they can't register when they try? Can they still see the forum?
  2. Can I TRUNCATE the xf_ip_match table ahead of every update so IP's wouldn't be blocked indefinitely?
  3. I have also read that xf_data_registry needs to be updated. Is this just for show in the AdminCP? I noted that data was in the form of a blob. How is that encoded and can I update via a PHP script?
Thanks for any Help
1. They get an error message saying they are banned. They can't see or do anything on the forum.

2. Yes.

3. The registry needs to be updated. It caches the values from xf_ip_match. You can just run this query to remove the registry record each time:

FROM xf_data_registry
WHERE data_key = 'bannedIps'

The software will automatically rebuild that record on the next page load when it sees that it is missing.
Top Bottom