first apologies if this is a v stupid question - forgive me - but i cannot make heads or tails for this scenario.
I created a python server script (basic socket script) that binds localhost and port 9999 on my PC. Next on my virtualbox (Linux mint) I run a simple telnet connection.
This is whats confusing the heck out of me - on my 'server'
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((_host, _port))
s.listen(3)
print (f'Listening on {_host} and port {_port}')
_conn, _addr =s.accept()
print(f'Server IP/Port {_conn.getsockname()} Established')
print(f'Client IP/Port {_addr} Established')
I can see that the python script is binding to port 9999 And when i run telnet from linuxmint I can see that the telnet session is connecting to the server
But i cannot co-rrelate the port that is on linuxmint vs what i see on my windows 10 python script
So ... This is the output from the python code snippet :
Listening on and port 9999
Server IP/Port ('192.xxx.xxx.xxx', 9999) Established
Client IP/Port ('192.xxx.xxx.xxx', 53016) Established
Listening on and port 9999
BUT Confirming this on windows netstat : Established 9999 192.xxx.xxx.xxx 53016 192.xxx.xxx.xxx
However; on the virtualhost when I do
netstat-tp
I get ... Local Address :55638
Question I have is what is 55638 and why dont i see 53016 as a port on linuxmint ??
Please can you help - i tried netsat -a | grep 53016 (nothing) but netstat -a | grep 55638 gives me the telnet hit.
Please can you help.
Thanks