开发者

Is there a way to forbid connection from outside of the local session in Windows?

开发者 https://www.devze.com 2023-01-14 18:16 出处:网络
Let\'s consider I have a开发者_如何学运维 service in my user session that listens on some TCP port.

Let's consider I have a开发者_如何学运维 service in my user session that listens on some TCP port.

Is there a way, on Windows, to only authorize processes from the same session to connect, and to deny connections from the "outside" ? ("outside" means another computer, and another user session on the same host).

I will also accept any alternative to TCP that allows only two process within the same session to communicate.

This has to work for Windows Vista, Seven and Server 2008.

Many thanks.


You can bind your listening socket on localhost (127.0.0.1) which limits connections to only internal local connections.

If you then want to limit it further on the originating session, you should build some form of authentication into the protocol running over the TCP connection. For example: the client must send the sessionname of it's own session before the server is going to communicate further.

0

精彩评论

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

关注公众号