Banhammer Pro makes it fun to monitor traffic and ban any bad actors. So whenever you see someone or something acting a fool, you can click a button and ban them immediately. But what if you want to ban a user or bot before they appear in the Armory traffic log? No problem. This post explains how to add manually any IP address to the Tower, so you can block literally any IP address whether they have visited your site before or not. The article also explains how IP addresses are added automatically when the pro version is first activated. It’s just good times.

Add IPs automatically..

By default any IP address(es) that are configured in the free version of Banhammer (via the Tower) will be imported into the pro version automatically during installation. Successful import from free to pro requires two important conditions:

  • The free version is deactivated but not uninstalled/removed when the pro version is first activated
  • The pro version is installed and activated via the WordPress Plugins screen

If either of those is not true, then the Tower IP addresses won’t be imported. For example if the free version is removed before activating the pro version, all of the Tower IPs will have been deleted, and thus won’t be available when the pro version looks for them.

If you have not yet uninstalled the free version, and the automatic import doesn’t work when activating pro, you can try deleting the pro version (via the Plugins screen) and trying again with a fresh installation.

Add IPs manually..

If you want to ban some IP that has not yet visited your site, you can do so by entering the following URL in your browser’s address bar:

https://example.com/wp-admin/?banhammer-key=[KEY]&banhammer-ip=[IP]

Replace the following:

  • Replace [KEY] with your “Target Key”
  • Replace [IP] with the IP you want to block
  • Replace example.com with your own domain

Note: You can find your Target Key in Banhammer Advanced settings.

For more info about adding targets, visit the Help tab on the Settings page.

Note: You can manually add IP addresses with either free or pro versions of Banhammer.

Important! Never share your Target Key, always keep it secret. If you think your key may have been compromised, you can change it via the plugin settings.