rejetto forum

Get Connections

newbie · 5 · 4350

0 Members and 1 Guest are viewing this topic.

Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
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: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
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 »
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile

Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
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: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
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 »
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing