Operating System - OpenVMS
1752655 Members
5867 Online
108788 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