Page 1 of 1 1
Topic Options
#8669 - 2001-05-14 06:40 AM How to find out if user is remote?
Anonymous
Unregistered


Hi,
My users have company issued notebooks. They connect to Internet and use Shiva VPN to connect to the corporate LAN. These are staff working from home during the night, weekends etc. Inclusive are staff on working trips.

I would like to decrease login time for these users by running a different script.

I was thinking of using IP address to detect the users. It turn out to be a failure as some times the notebooks can have 2 IP addresses (1 from the Shiva VPN and 1 from office LAN).

Is there a way I can detect the status of these users?


Top
#8670 - 2001-05-14 07:33 AM Re: How to find out if user is remote?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
You can use the KIX Macro @RAS if these are dialup users.

HTH,

- Kent

------------------
Moderator/Admin
Get/Post Scripts
http://www.win-scripts.com

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#8671 - 2001-05-14 09:07 AM Re: How to find out if user is remote?
Anonymous
Unregistered


Hi, Thank you for your reply.

@RAS, the users are dialling up the NT server. My users are using their own ISP dialup (which is free) and VPN tunnel across the Internet to my Shiva VPN gateway.

I have found that @ipaddressX can be used to check IP address. A Win 9x station can have 4 IP address. Change X accordingly from 0 to 3. I am currently trying to figure out the program logic.

Any comments, suggestions or alternative methods are most welcome


Top
#8672 - 2001-05-14 09:33 PM Re: How to find out if user is remote?
cmarti Offline
Hey THIS is FUN

Registered: 2001-02-26
Posts: 297
Loc: Little Rock, AR
I'm checking for the existence of a second ip. If that second ip is in the subnet of our shiva servers then, it wil run the shorter script.
Top
#8673 - 2001-05-18 02:02 PM Re: How to find out if user is remote?
Anonymous
Unregistered


I have spent some time on this for our W9x clients.

First I tried to use @RAS but it can't determine if a user is coming into the network via a vpn connection to their ISP.

Then I thought well i'll just check the value of their IP address using @IPADDRESS. The problem with this is that if the user still has their pcmcia card in the laptop and they don't have a separate hardware profile or they have started their laptop in the "network" profile, @IPADDRESS will find the IP Address of the NIC instead of the PPP Adapter.

What I ended up doing which I feel is the definitive way to determine if they are networked or dialing in is to redirect the output of WINIPCFG to a file, parse it until the line PPP Adapter is found, then continue parsing until the line IP Address is found. If it is 0.0.0.0 then they are local.

It is a little klugy but it works.

Hope this helps

Top
#8674 - 2001-05-21 03:32 AM Re: How to find out if user is remote?
Anonymous
Unregistered


Thank you all for your assistance
Top
#8675 - 2001-05-21 08:43 PM Re: How to find out if user is remote?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Hello highdiver_2000,

This article from Microsoft may help.

How to Determine Whether a Client Is Connected by RAS or LAN
Article ID: Q173530 http://support.microsoft.com


NTDOC...

Top
#8676 - 2001-05-22 03:44 AM Re: How to find out if user is remote?
Anonymous
Unregistered


Hi,

Following cmarti's example, I am checking on @IPADDR1. If the subnet matches that issued by the VPN gateway, the shorter script is executed.

I am trying to keep the code lean, no point incurring more overhead. Right?

regards

Top
#8677 - 2001-05-22 04:00 AM Re: How to find out if user is remote?
Anonymous
Unregistered


I use the following for shiva remote clients

:win95
$win95key = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Shiva Corp.\Shiva VPN Client\", "appLoaded")
IF $win95key = 1
GOTO QUESTION

:win2000
$win2000key = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Shiva Corp.\Shiva VPN Client\", "domaintunnelup")
IF $win2000key = 0
GOTO QUESTION

The only trap is that the uses must log off via the File | exit and log off otherwise if they just "x" out, the registry value stays up and when they log onto the LAN they are seen as remote.

Users seem to like the time we save over the VPN, and know how to log off properly now

Top
#8678 - 2001-05-25 12:16 AM Re: How to find out if user is remote?
Anonymous
Unregistered


If you use DHCP to assign IP addresses, auto release lease on shutdown to clear ip addresses then you should be able to get kix to query vpn address, I use this method and it works fine !
Top
#8679 - 2001-05-25 04:01 AM Re: How to find out if user is remote?
Anonymous
Unregistered


Hmm,
Interesting !!! With the danger of going off thread, how do you get the client to give up the lease?

regards



Top
#8680 - 2001-07-24 08:53 PM Re: How to find out if user is remote?
Dennis Rigdon Offline
Fresh Scripter

Registered: 2001-07-04
Posts: 8
Loc: OKC, OK
How to Cause Windows 98 to Release DHCP Lease Information at Shutdown - Q217035
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.058 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org