How to add a white list to the TTC security plugin

Posted by ljmacphee on July 25, 2008 under how to, security, wordpress |

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.

Add A Comment

You must be logged in to post a comment.