While I don't have time to make a full mod/admin plugin for this right now, I just wrote the following for you. Just add ranges to the $pun_allow_ip_ranges array (the first 3 blocks of the IP's you want to allow). The drawback by not having a admin plugin is that you'll have to manually add IP's directly to the register.php file when you want to add/remove allowed addresses, but I hope it helps you out a little
Just open ./register.php and find on line 41:
require PUN_ROOT.'lang/'.$pun_user['language'].'/prof_reg.php';
Add after:
/**
* - Limit allowed IP ranges during registration -
*
* Step 1:
*
* Array of allowed IP ranges. I'm using only the first 3 blocks here, so if you
* need to be more specific you'll have to change the regex in step #2. Just add
* addresses in the same way as I've written the example IP's.
*/
$pun_allow_ip_ranges = array(
'127.0.0',
'192.168.1'
);
/**
* Step 2:
*
* Get the first 3 blocks from the users IP address, and capture it into the
* $user_ip variable, then check if it is within the allowed range. If we can't
* get the users IP address for whatever reason, we will also exit with a
* "bad request" message.
*/
if( preg_match('#(\d{1,3}\.\d{1,3}\.\d{1,3})\.\d{1,3}#', get_remote_address(), $user_ip) ) {
if( !in_array($user_ip[1], $pun_allow_ip_ranges) )
message($lang_common['No permission']);
} else {
message($lang_common['Bad request']);
}