Hello All,
First off - What I'm trying to do.
We are using Quest AppPortal for published applications. Our requirement is that the end user has to be connected to our network (LAN or WAN) in order to use it (hate company politics).
Now as many times as I have explained to end users that if they are not on our network (within the confines of our buildings) that they have to connect to VPN first prior to launching this "AppPortal", and as you can assume with many it just does not sink in.
What I am hoping
So, I am currently trying to think of the best way to go about this.
A First thought
A thought I had was to create an array containing a list of each of our networks
Then an array consisting of @ipaddress1, and @ipaddress2
Then search for the first three octets of that second array within the first array
The check to see if anything in that second array matches any of the items in the first array
If it exists simply launch that AppPortal and if not Launch VPN first, then once VPN gets connected launch AppPortal
Example
#include <array.au3> Local $aSubnets[4] $aSubnets[0] = "10.0.4" $aSubnets[1] = "192.168.4" $aSubnets[2] = "192.168.5" $aSubnets[3] = "192.35" Local $aCurrentIP = [@IPAddress1, @IPAddress2] Local $iIndex = _ArraySearch( This is where I get lost )
My Problem
I am not sure how I can go about this using this method. First off I'm not sure how to check if the first 2 or 3 octets match those in $aSubnets (suppose I could grow that $aSubnets array to include all options of that 192.35.x.x network so I have three octets all around)
$aSubnets[0 through 2] containing 3 octets and the last only containing 2 ** [0] is our VPN, [1 and 2] wireless networks, and [3] being wired **
I cannot only search the first 2 octets as many home networks as you all know would probably consist of 192.168.x.x in the first 2 octets as well
Any help appreciated