I have my environment setup to listen to jetty on port 8888. However, for a limited time, I will have to also listen on 8889.
I though of using named pipes and nc for that:
mkfifo pipe1
/bin/nc -l 8889 0<pipe1 | /bin/nc localhost 8888 1>pipe1
I noticed that the port forwarding will only work for a certain amount of time, returning the prompt after.
Why is it only working for a certain amount of time?
Is there a better port forwarding mechanism I could use? All of this runs on my local machine, between the ports 8888 and 8889.
This is on a Ubuntu 14.04.