开发者

Distinguishing between multiple clients behind the same NAT

I have a Server X and 2 clients A and B behind the same NAT. A and B need to form 10 TCP connections each to X on the same outbound port. X should only accept at most 10 connections from a single client. So I need X to tell A from B right after accept(). Is there any way to do this with just the information in a TCP packet or do or do I have to have the client send the server some unique ID aft开发者_StackOverflower the connection is established?


In IP, the clients are only identified by their IP address. It is not possible to know from which client the connection came from if there is NAT in between.

In reality TCP/IP stacks of different operating systems and operating system versions work a bit differently and fingerprinting the clients might be possible. This is most likely not useful for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜