Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

5 Answers 5

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.

share|improve this answer
    
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.
share|improve this answer
    
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".

share|improve this answer

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

http://www.dest-unreach.org/socat/

one example from the man-page:

socat -d -d -lmlocal2 \
TCP4-LISTEN:80,bind=myaddr1,su=nobody,fork,range=10.0.0.0/8,reuseaddr \
TCP4:www.domain.org:80,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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

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.