I am looking for a small standalone program that listens to a port and redirects everything to another port.

Unlike iptables it should not need require root (except if you want to listen to a privileged port)


  • Simple command-line syntax like tinyredirect 9211 8080
  • Press CTRL-C and the redirection stops
  • Runs on Linux, Java OK
  • Free
  • Open source
  • Relatively maintained

Bonus for Ubuntu/RedHat packages.
UDP not required.


socat is a simple userland program that can redirect ports:

socat TCP4-LISTEN:8080,fork TCP4:localhost:9211
  • Press CTRL-C and it stops.
  • Runs on Linux, packages for Ubuntu/RedHat
  • Free, GNU-GPLv2
  • Updated in 2014

If you want to listen to a privileged port, you need to prefix the command by sudo.

  • Isn't there a limitation in ports? I mean, you couldn't e.g. forward port 80 to port 90 without root IMHO.
    – Izzy
    Sep 12 '14 at 6:06
  • 1
    If you want to listen to a privileged port, you need sudo, yes.
    – Nicolas Raoul
    Sep 12 '14 at 6:12
  • Thanks for the update! Yes, that was exactly what I meant (a mental blackout prevented the term "privileged port" to come up for me blind man, should have seen it mentioned in the question itself ;)
    – Izzy
    Sep 12 '14 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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