Author Topic: Get Connections  (Read 852 times)

0 Members and 1 Guest are viewing this topic.

Offline newbie

  • Occasional poster
  • *
  • Posts: 27
    • View Profile
Get Connections
« on: October 23, 2019, 02:18:01 PM »
I notice that the UI displays a table for Connections with 6 entries for one client.
Is there a way for me to get that list of IP addresses via a script?

There doesnt appear to be a GetConnections here:
https://www.rejetto.com/wiki/index.php/HFS:_scripting_commands#Connections_control

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 880
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: Get Connections
« Reply #1 on: October 23, 2019, 06:44:19 PM »
cmd command:

C:\Users\Brandon>netstat -a

example out look:
Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:7              Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:9              Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:13             Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:17             Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:19             Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:135            Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:445            Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:2179           Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:5040           Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:5357           Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:49664          Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:49665          Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:49666          Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:49667          Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:49668          Brandon-Laptop:0       LISTENING
  TCP    0.0.0.0:49672          Brandon-Laptop:0       LISTENING
 
« Last Edit: October 23, 2019, 09:28:51 PM by bmartino1 »
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline newbie

  • Occasional poster
  • *
  • Posts: 27
    • View Profile
Re: Get Connections
« Reply #2 on: October 23, 2019, 08:59:27 PM »
Ok. Thanks. That should work.

Offline newbie

  • Occasional poster
  • *
  • Posts: 27
    • View Profile
Re: Get Connections
« Reply #3 on: November 11, 2019, 05:55:33 PM »
Sorry. I am back. I cannot depend on netstat -a anymore.
The machine is going to be host to numerous other servers, and I want to be able to filter out the non-HFS connections.
I'm thinking of collecting the IPs when the clients make the first initialization call to HFS, and removing the IP when the client disconnects.
Unless you'all know of something better.

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 880
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: Get Connections
« Reply #4 on: November 11, 2019, 06:06:07 PM »
i remember something with the hfs log and macro ...

something like macro command 
append %ip%

https://www.rejetto.com/wiki/index.php/HFS:_scripting_commands

might have to become an hfs event
like syslog watch dog

https://www.rejetto.com/wiki/index.php/HFS:_Event_scripts

[request]
Append log.txt %time% %ip%

something like that...
« Last Edit: November 11, 2019, 06:11:52 PM by bmartino1 »
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1