Page 1 of 1 1
Topic Options
#120677 - 2004-06-04 08:16 PM log ip address to text file for machine /w 2 NICs
Seks Offline
Fresh Scripter

Registered: 2002-10-31
Posts: 20
Currently, in the login script, we have it so that when a user logs in, the user's information is logged into a textfile:

REDIRECTOUTPUT ("\\CORPDC01\LOGS$\user name\@USERID.txt", 1) ? "@DATE, @TIME, @USERID, @PRODUCTTYPE, @WKSTA, @ADDRESS, @IPADDRESS0, @DOMAIN, @LSERVER, $center_name"

We've just implemented machines with 2 NIC's, one connected to LAN (10.91.x.x) and one connected to the Government's registry (142.x.x.x). How do I do it so that the logging of ip address will be from the NIC of 10.91.x.x? Right now, the 142.x.x.x NIC is being logged.

Top
#120678 - 2004-06-04 08:25 PM Re: log ip address to text file for machine /w 2 NICs
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The 0 at the end of @IPADDRESS0 denotes the first NIC. A 1 as in @IPADDRESS1 would denote the second. You need to provide the smarts to enum them both to know which is which.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#120679 - 2004-06-06 08:57 PM Re: log ip address to text file for machine /w 2 NICs
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also the FAQ Forum under the TCP/IP Primer which lists several UDFs that might be helpful.
_________________________
There are two types of vessels, submarines and targets.

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 (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.053 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