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. See the help center for guidance on writing a good question.
Read more about locked posts here.
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 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.
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=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.
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.