2
0
Let's say i have a "server" program listening on address 1.2.3.4:69 (i.e. remote port 69)
When i connect from a "client" program to it, typically i would specify the IP address + port of the target or server system;
But what port would the client be using ? And how does the server know which port to connect back to the client on?
I understand this question is very general, but just wanting to get a general feel for how things work.
Then extending this to a specific protocol, say FTP (typical port 21), can I change it such that the server uses port 69, but the client uses port 100?
And similarly, for Remote Desktop in WinXP (typical port 3389), i know how to change the server port to be something other than 3389, but how does one change what port the client uses (if at all possible)?
There's a related question on serverfault that might help you: http://serverfault.com/questions/78925/source-and-destination-ports-on-tcp-connections
– sleske – 2011-03-20T15:45:20.837