I am very happy that I found this topic. I had read the article and was already converting it to kix. This topic saves me some time.

I have two corrections on the code in this topic:
1. In function isiniprange it is assumed that variable $iprangearray is already an array; it is not.
My new code:

function isiniprange($ipaddress,$ipranges)
Dim $iprange, $networkid, $subnetmask, $bit
$iprangearray=split($ipranges,',')

2. The script is (trying) to fire both when a VPN connection is established but also when it is disconnected. This can be changed:
In $objEvents change __InstanceOperationEvent to __InstanceCreationEvent

regards
Xaveer van den Berg