Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to forward an existing port for an application which can only listen on one port. The problem is the program and the firewall is on the same computer (Windows Server 2008 R2).

For instance, my app listens on port 65000. Users can access it from But I want to add the possibility for users to access it from The server would act like a NAT, but on the same machine, changing request packets' destination port from 64000 to 65000 and the response packets' originating port from 64000 to 65000.

As far as I could do, I only succeded in the first phase, with destination port. But the server responds either on wrong address (depending on the params I set, if I kept the source address or rewriting to or wrong originating port. It was with NetworkActif Autapf, but I think I can do it with the Windows Firewall...

Is there any way to do it ? (On Windows Server 2008 R2)

Thanks in advance.

share|improve this question

I would just use a proxy like rinetd. Basically, just have an application listen on port 64,000 and when it receives an incoming connection, make a local connection to port 65,000 and proxy all the data. This won't work if your application needs to see the remote IP address and port for some reason.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.