开发者

Is there a way to make it look like two programs are listening to port 80

I do know that I can't have two programs listening to the same port, but I am wondering if it is possible to fake it somehow, for an example:

My machine has two applications, one listening to port 80 and the other to port 6653.

If I get an incoming connection, let's say mys开发者_JAVA百科ite.com:80/chat then it would be forwarded internally to the application listening on port 6653 and the data returned from that server would be forwarded back to port 80 somehow.

The reason I want to accomplish this is because there are many firewalls that seem to block connections to ports other than 80.

I have a chat server that I want to run on port 80, perhaps I could get another IP and machine for that, but it feels like too much trouble for a single chat server.

Any helpful feedback would be appreciated. Thanks!


You can probably do this with mod_rewrite if you're running Apache. That link has plenty of examples, including what you want (I think).

EDIT: I see you've updated the tags to say "asp.net". I'm guessing that you're not running Apache, then. I'm sure there is a similar tool for IIS, or you can use a proxy server that does the same thing.


There is a module called URL Rewrite that you can install on Windows Server 2008 (and R2) that is functionally the same as Mod_Rewrite. Download it here: http://www.iis.net/download/URLRewrite

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜