susu6514 Posted July 22, 2010 Share Posted July 22, 2010 Hi, I'm wondering if we can make the TCP/UDP to use a specific source port number to connect to the server. And on server side, if we can know the client's source port if they are connected to our server and reject or accept some ports. Thanks in advance. Su Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 22, 2010 Share Posted July 22, 2010 Did you even look at the TCP* functions in the help file? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
susu6514 Posted July 23, 2010 Author Share Posted July 23, 2010 Yes, I did. My environment is like this PC1(Send TCP or UDP) ------>NAT Gateway --------> PC2(Receive TCP or UDP packets) When PC1 sends the packets through NAT device, the source port will be translated to other ports. What can I do to know the source port sent from NAT on PC2? Thank you. Link to comment Share on other sites More sharing options...
Theri Posted July 23, 2010 Share Posted July 23, 2010 Not sure I get what you mean. Usually when you bind a tcp connection to a port and establish a connection with a remote computer/server you will both be communication on the same port. So if you're accepting connections on port 50 both the server and client are using port 50. Link to comment Share on other sites More sharing options...
susu6514 Posted July 23, 2010 Author Share Posted July 23, 2010 To be more correctly, I'd like to do PC1(Src port 1024) ------>NAT Gateway (Src port 49152)--------> PC2(Receive TCP or UDP packets) From PC2, I'd like to know the incoming port is 49152 and I'd like to show it to the users and maybe send back to port 49152. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now