How to know the ip of the terminal used to open a RDS session

9 Posts
3 Users
0 Likes
51 Views
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hi all

Does anyone know how it could be possible to know in Pcvue the IP of the terminal used to open an RDS session

Thanks a lot

 
Posted : 02/09/2022 6:26 pm
KASI
 KASI
(@k-simanjalamarcinfo-com)
Posts: 134
Estimable Member
 

Hi Nico,

Do you mean to know from which IP address the RDS connection was made (the originator)?

 
Posted : 06/09/2022 3:49 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hi Kantha

Yes, from which IP address the RDS connection was made

I found this command line
netstat -n | find ":3389" | find "ESTABLISHED"

where 3389 is the port used by RDP

We can save the result in a file and then ask PcVue to read it but :
-can we do it more easily
-what is the result if two or more RDP session are established on a server

Thks

Nico

 
Posted : 06/09/2022 6:48 pm
KASI
 KASI
(@k-simanjalamarcinfo-com)
Posts: 134
Estimable Member
 

Hi Nico,

Same thinking. I found the same solution, and also with the same question about having two or more RDP sessions established on a server.
Unfortunately, I do not have an answer for this?.

I did find some old post about a powershell module that could list some RDS client details. It seems to be able to give the client name and IP address, but again, I have not tested this solution. So maybe you could give it a try?
https://social.technet.microsoft.com/Forums/lync/en-US/70aa4e5b-a37f-4d79-b097-3df39b28419f/where-in-windows-2012-r2-do-i-find-rds-client-session-information?forum=winserverTS
https://aacable.wordpress.com/tag/psterminalservices/#:~:text=Powershell%C2%A0PSTerminalServices%20module

 
Posted : 06/09/2022 9:32 pm
b.lepeuple
(@b-lepeuplearcinfo-com)
Posts: 149
Estimable Member
 

Hi,
I am not sure I catch the issue here.
If you are in PcVue, you can get your station number. In an RDS set-up, there is a one-to-one correspondance between your station number and your IP (or hostname).
Do you mean you do not want to parse the station.dat in SCADA Basic ?
Regards

 
Posted : 07/09/2022 2:00 pm
b.lepeuple
(@b-lepeuplearcinfo-com)
Posts: 149
Estimable Member
 

So I am wrong, thank you Kantha for correcting me 😉
If the goal is to get the IP address of the RDS client device, then it is probably a lost battle because the RDS server may not even be connected directly to the RDS client. If there is a router somewhere in between, the RDS server only knows about the router address. And I do not see how PcVue in a session on that RDS server would be able to get more.
Sorry (but parsing a station.dat in SCADA Basic is fun anyway)

 
Posted : 07/09/2022 2:13 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hi
Thanks you Benoit and Khanta

I need to inhibit writing data (population) if the terminal used to open the rds session is in a certain IP RANGE if it is outside of this IP range writing data will be ok.

Nico

 
Posted : 07/09/2022 6:34 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

I will try to do some tests

 
Posted : 08/09/2022 2:40 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hi

I did a short test
If two RDS sessions are openned the command line netstat -n | find ":3389" | find "ESTABLISHED" (executed in one RDS session) returns the list of all the terminals connected to the server, not only the current one used to open the current session

Benoit is probably right...loss battle

Nico

 
Posted : 15/09/2022 3:38 pm