Operating System - OpenVMS
1820299 Members
2975 Online
109622 Solutions
New Discussion юеВ

Re: reflection client IP

 
mustafa_12
Frequent Advisor

reflection client IP

Hi all,

Some of the clients login to my VMS server using reflection client. When I want to see decnet or tcp/ip IP of connecting client using sys$rem_node or other logicals, I could not find any info relating to remote node id.

How can I learn the remote id of clients connecting via reflection
17 REPLIES 17
David B Sneddon
Honored Contributor

Re: reflection client IP

Why not use SHOW USER/FULL which will give you
the details of the remote end?

Dave
mustafa_12
Frequent Advisor

Re: reflection client IP

Hi Dave,

"show users /full" gives me only the terminals of reflection clients like:

user1 host1 _FTA354: 206D81E7 FTA354:
user1 host1 _FTA355: 206B11EA FTA355:
user1 host1 _FTA357: 206B4024 FTA357:

Is it possible to learn remote id from these info?
David B Sneddon
Honored Contributor

Re: reflection client IP

Can I assume that you are connecting via ssh?
If that is the case, then I don't believe there
is any "easy" way to get the information you
want.

Dave
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

$get_ip:
$! When NAT is in place, the PC can not deliver the ip address.
$! We will look it up ourself.
$ rem_node=""
$ show proc/out=sys$login:pc_sm_dev.tmp
$ open/read x1 sys$login:pc_sm_dev.tmp
$r1:
$ read/end=e x1 x_rec
$ if f$loc("Devices allocated:",x_rec) .ge. f$len(x_rec) then goto r1
$ bg=f$el(2," ",f$ed(x_rec, "compress"))
$! ucx will open the file in append, so delete it first !!!
$ if f$sea("sys$login:pc_sm_ip.tmp") .nes. "" then del sys$login:pc_sm_ip.tmp.*
$ def/us sys$output sys$login:pc_sm_ip.tmp
$ ucx show dev 'bg'
$ open/read x2 sys$login:pc_sm_ip.tmp
$ read/end=e x2 x_rec
$ read/end=e x2 x_rec
$ rem_node=f$extr(55,15,x_rec)
$e:
$ if f$tr("x1") .nes. "" then close x1
$ if f$tr("x2") .nes. "" then close x2
$ return
Wim
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

Notes

I get the bg device out of show proc.
Then I search for it in the ucx show dev listing.

I use this when a rsh comes in and requests to start X with output directed to the PC.
When NAT is in place, the PC doesn't know what address it has. So, we have to search for it.

Not yet tested with SSH.

Wim
Wim
mustafa_12
Frequent Advisor

Re: reflection client IP

Hi Wim,

When I "show proc", it gives "Device Allocated" as:

Devices allocated: SERVER1$TNA4074:

However, when "tcpip show dev", all "device sockets" starts with "bgXXXX""".

Therefore, I can not correlate tnaXXXX devices and bgXXXX devices
Karl Rohwedder
Honored Contributor

Re: reflection client IP

TNAxx points to TELNET or RSH and should normally display the originating host.
You may try:
$ TELNET
TELNET> SHOW DEVICE TNAxxx

regards Kalle
Karl Rohwedder
Honored Contributor

Re: reflection client IP

Mustafa,

you may also try to set the appr. TCPIP service to /LOG=(LOGIN,LOGOUT). Login/logout is then recorded in the OPERATOR.LOG file.

Example:
$ TCPIP
TCPIP>DISABLE SERVICE TELNET
TCPIP>SET SERVICE TELNET/LOG=(LOGI,LOGO)
TCPIP>ENABLE SERVICE TELNET

regards Kalle
Bart Zorn_1
Trusted Contributor

Re: reflection client IP

Hmm...

Processes connected to a FTA device do not display any VTA, TNA, BG or other device as allocated, only the FT device.

Using SDA you can find out which WSA device is open, and then use SHOW DISPLAY WSAnn: to find the ip address of the PC.

Something like:

$ pipe write sys$output "show proc/chan/id=''p1'" | -
anal/sys | search sys$pipe wsa | -
( read sys$pipe line ; -
wsa_dev = f$element(3," ",f$edit(line,"trim,compress")) ; -
show display &wsa_dev )

Regards,

Bart
Karl Rohwedder
Honored Contributor

Re: reflection client IP

Mustafa,

I am a little bit confused, you either say, a 'show proc' gives you a TNAxxx device and a 'show user' gives a FTAxx device. Which one is true?
In case of a FTA device, you may try
$ SHO DISPL/SYMBOL
$ sh sym *displ*
DECW$DISPLAY_NODE == "VWAGWOCOE841"
DECW$DISPLAY_SCREEN == "0"
DECW$DISPLAY_SERVER == "0"
DECW$DISPLAY_TRANSPORT == "TCPIP"
to get the remote node.

regards kalle
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

You can rewrite the procedure :
do a "show dev bg" to a file and scan for your process id. If you find it, do a ucx show dev bgxxxx to get the IP address.

Good luck !

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

Mmmm

Must agree with Bart. The BG device is not allocated for telnets. Ignore my last post.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

To be more precise : a telnet has a bg device but it's not assigned to your process id (ucx show dev will show the ng device). Strange.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

Never noticed it before but :

show term

while logged in, will display the name or IP address of the host.

Wim on 7.3 and 6.21h3
Wim
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

Note that it's only displaying the info of the last link.
If you do :
$ telnet A
and on A
$ telnet A
then you will not find where the original telnet was coming from.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: reflection client IP

And I can confirm that SSH of process software also puts something in the output of sh term (ssh/node:port)

This while the EAK of SSH of HP is not showing anything.

Wim
Wim
mustafa_12
Frequent Advisor

Re: reflection client IP

Hello all

Karl,

first of all, you are right. I did sent wrong info. It must be ftaXXX (not tnaXXX). Sorry for this.

Now, below you can find the outputs of all you recommended. As seen, I can not find any useful info for the remote ip. Is there anything that I miss?

Anyway, I have found a solution for myself. I have edited sys$system:pcx$server.com in order to log the remove decnet ip to a a file in every session request.



server1:[user1]sh proc

8-NOV-2006 19:10:21.35 User: user1 Process ID: 206D84D3

Node: server1 Process name: "_FTA422:"

Terminal: FTA422:
User Identifier: [gr1,user1]
Base priority: 4
Default file spec: $DISK1:[user1]
Number of Kthreads: 1
Devices allocated: server1$FTA422:
Soft CPU Affinity: off



server1:[user1]sh term

Terminal: _FTA422: Device_Type: VT300_Series Owner: _FTA422:
Username: user1

Input: 9600 LFfill: 0 Width: 80 Parity: None

Output: 9600 CRfill: 0 Page: 24



Terminal Characteristics:

Interactive Echo Type_ahead No Escape

Hostsync TTsync Lowercase Tab

Wrap Scope No Remote Eightbit

Broadcast No Readsync No Form Fulldup

No Modem No Local_echo No Autobaud No Hangup

No Brdcstmbx No DMA No Altypeahd Set_speed

No Commsync Line Editing Overstrike editing No Fallback

No Dialup No Secure server No Disconnect No Pasthru

No Syspassword SIXEL Graphics No Soft Characters Printer port

Numeric Keypad ANSI_CRT Regis No Block_mode

Advanced_video Edit_mode DEC_CRT DEC_CRT2

DEC_CRT3 No DEC_CRT4 No DEC_CRT5 Ansi_Color

VMS Style Input



server1:[user1]anal /sys
sda> show proc /chan /id=206D84D3

Process index: 00D3 Name: _FTA422: Extended PID: 206D84D3
--------------------------------------------------------------------


Process active channels
-----------------------

Channel CCB Window Status Device/file accessed
------- --- ------ ------ --------------------
0010 7FF72000 00000000 $1$DGA99:
0050 7FF72080 8195EDC0 $1$DGA99:[VMS$COMMON.SYSEXE]DCL.EXE;1 (section file)
0060 7FF720A0 81952C80 $1$DGA99:[VMS$COMMON.SYSLIB]DCLTABLES.EXE;199 (section file)
0080 7FF720E0 00000000 Busy FTA422:
0090 7FF72100 00000000 FTA422:

Total number of open channels : 5.


server1:[tilot1]show log *disp*
(LNM$PROCESS_TABLE)
(LNM$JOB_8226DA40)
"DECW$DISPLAY" = "_WSA195:"
(LNM$GROUP_000140)
(LNM$SYSTEM_TABLE)
(LNM$SYSCLUSTER_TABLE)
(DECW$LOGICAL_NAMES)