Determine if Client IP Range in Login Script

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 12 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
M4TTYC88
Posts: 1
Last visit: Mon Jan 23, 2012 9:39 pm

Determine if Client IP Range in Login Script

Post by M4TTYC88 »

Hi All

This is my 1st post so bear with me.

Due to a file server migration at work i have had to do some major surgery on our Logon script to match new shares and to tidy it up.

I've been asked to stop anybody coming in over the VPN to not run the script. The only way I can think of doing this is to determine if the client's IP is within a certain IP range and then get it to exit the script, else carry on with the script. I've spent a good few hours researching how to do this but i'm getting nowhere.

Does anybody know i should be writing this into the script or any tips as to what i should be looking for.

Thanks

Matt
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Determine if Client IP Range in Login Script

Post by jvierra »

What have you tried?

IPs are strings. YOu would need to match each elemen oft the string. How would depend on the range for inclusion.

This topic is 12 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked