I am talking thru TCP driver. Over port 23.
Let’s say the server is 126.96.36.199 and the device is 188.8.131.52
So we set the device driver up to 184.108.40.206:23
Is there any way to know where the connection will come from? 220.127.116.11:5000 or is random and changes?
Pseudo-random. Google “tcp ephemeral ports”.
No, it’s unknown (an ephemeral port).
Lol I figured.
Would it be a waste of time If I summited it to ideascale? I suppose it wouldn’t be trivial to add a configurable block of ports you could use for connections like this. From the server side.
The ephemeral port is chosen by the operating system, not by an application. Some operating systems allow you to constrain the range, but I’ve only seen it for global effect on all TCP traffic.
Note that both ends normally end up on an ephemeral port–the “23” is used just for the first packet in typical applications.
Tools like wireshark will remember what port was used to open a connection and will keep the connection’s packets together. As long as it sees that first packet.
Hmmm. Learned something new today.
It doesn’t need to see the first packet, it sees the destination port in the TCP header.
It’s very common to have functional captures that didn’t capture the connection being made.
Guess I should use your EthIP driver instead with these devices
As always thank you for sharing your seemingly endless knowledge!!