IPv6 is here and IPv4 is definitely running out of time. Here in the Netherlands, the consumer internet providers have been “working on it” for years. I’ve been lobbying for IPv6 connectivity for years, without much luck. After a time of experimenting with IPv6-over-IPv4 tunnels and Teredo, I basically gave up on those technologies due to various reasons; high latency, complexity & subnet reputation (a lot of shady stuff was going on those free IPv6 subnets).

Recently, I finalized my IPv6 implementation in my hosted environment (couple of websites, other apps/databases), which also contains a NSX testlab. Considering … Read more

Incase you don’t have the luxury of PHP5’s filter_ functions, this is a handy regexp:

function validate_ipv6($ip)
$hex = ‘[A-Fa-f0-9]’;
$h16 = “{$hex}{1,4}”;
$dec_octet = ‘(?:25[0-5]|2[0-4]d|1dd|[1-9]d|[0-9])’;
$ipv4 = “$dec_octet.$dec_octet.$dec_octet.$dec_octet”;
$ls32 = “(?:$h16:$h16|$ipv4)”;
$ipv6 = “(?:(?:{$IPv4address})|(?:”.
“(?:$h16:){6}$ls32” .
“|::(?:$h16:){5}$ls32” .
“|(?:$h16)?::(?:$h16:){4}$ls32” .
“|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32” .
“|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32” .
“|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32” .
“|(?:(?:$h16:){0,4}$h16)?::$ls32” .
“|(?:(?:$h16:){0,5}$h16)?::$h16” .
“|(?:(?:$h16:){0,6}$h16)?::” .

$regex = “/^$ipv6$/”;
return preg_match($regex, $ip);

Read more