Herself's Webtools

Scripts, HowTos, Templates, Plugins, Widgets, Tips

How to add a white list to the TTC security plugin

without comments

Lots of people have asked how to white list some ip numbers on the ttc-security-plugin. I strongly recommend you adjust your blocked settings rather than a use a white list. But If you want a white list here is how you do it.

Open a copy of your ttc-security.php file and find this section:

// don't ban ourselves....
if ( $http_local_addr == $http_remote_addr ){
$blacklisted = 0;
}

Right underneath that is where your white list will go. I’ve white listed 3 ip addresses 127.0.0.1, 127.0.0.2, 127.0.0.3 here.

/// White list of known good guys
///-----------------------------------------------------------------------------------------------------------

if ( “127.0.0.1″ == $http_remote_addr ){
$blacklisted = 0;
}else if ( “127.0.0.2″ == $http_remote_addr ){
$blacklisted = 0;
}else if ( “127.0.0.3″ == $http_remote_addr ){
$blacklisted = 0;
}
///———————————————————————————————————–

You just need to change the 127.0.0.1, 127.0.0.2, 127.0.0.3 to the addresses you want to white list. You can just add more
else if ( "127.0.0.3" == $http_remote_addr ){
$blacklisted = 0;
}

if you need to white list more ips. This is the fastest way I know to do this. Before white listing any ips be sure to go to Whois and verify they are who you think they claim to be.

Written by Linda MacPhee-Cobb

July 25th, 2008 at 8:29 am

Posted in how to,security,wordpress

Leave a Reply

You must be logged in to post a comment.