Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Is anyone familiar with a port mirroring or port translation tool for Windows (2k8 if it makes a difference)? I have an installation of Openfire that needs to run over 443, however, it doesn't support client connections on that port (currently is on port 5222). Currently the firewall is handling this port translation, however, this doesn't work for internal users as DNS is pointed to a local address and not the firewall.


locked by HopelessN00b Dec 5 '14 at 8:55

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

up vote 1 down vote accepted

You could use rinetd which is a similar solution to that of the other answers, or you could run Openfire as an administrator which will allow it to listen on ports <1024, such as 443, without any port mirroring.

I'm going to try changing the svc account to a higher privileged one. I'm interested to see if that works. – Ken Phaup May 15 '09 at 12:28

I am not sure if this works using the same local IP address as remote adress, but you could try this free tool: RelayTCP

RelayTCP allows to redirect TCP/IP connections from a local port to a remote IP and port.

There is two versions of the software:

  • RelayTCP command line: is a command line executable to make one socket redirection.
  • RelayTCP service: is a NT service that allows make multiple redirections.
Thanks for sharing this tool. – Saif Khan May 14 '09 at 19:46

If you don't mind having your XMPP sessions encrypted (and why would you?!) you should be able to use stunnel to proxy between the two ports.

There are Windows binaries available, although I don't know if it can run as a service "out of the box".


You could try socat under cygwin, it is a "swiss army knife" like netcat, but works for bidrectional connections:

one example from the man-page:

socat -d -d -lmlocal2 \
TCP4-LISTEN:80,bind=myaddr1,su=nobody,fork,range=,reuseaddr \,bind=myaddr2

TCP port forwarder, each side bound to another local IP address (bind). This example handles an almost arbitrary number of parallel or consecutive connections by fork'ing a new process after each accept() . It provides a little security by su'ing to user nobody after forking; it only permits connections from the private 10 network (range); due to reuseaddr, it allows immediate restart after master process's termination, even if some child sockets are not completely shut down. With -lmlocal2, socat logs to stderr until successfully reaching the accept loop. Further logging is directed to syslog with facility local2.


I would look first at the configuration file for Openfire, which is pretty flexible. It's been a while since I have worked with it, but the port it listens on should be a configuration option in the XML-based config file, and some Google searches and/or a review of the documentation should turn up some more details if the config file isn't self-documenting. No use making the solution more complex if you can solve it in your application, and it may (I'm not sure) be capable of listening on both ports at once even.


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