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

I am currently working on a webapplication which uses node.js and need to start a small tcp on port 843 for delivering crossdomain.xml's for FlashPlayers socket connections. As port 843 < port 1024 the node process must run as a root process, which is something I want avoid. Are there any possibilities to forward this port to another port. E.g.: Connection comes in on port 843 and is handled by a process listing to port 3000?

My first guess was to use iptables, but I am quite unfamiliar with it so I asked here for more information and a hint if I am looking in the right direction. If this could be suitable for my problem, are there any performance issues when using iptables?

share|improve this question

Sure, you could use iptables to do that. Here's an example one-liner:

# iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 843 -j REDIRECT --to-ports 3000

There shouldn't be any practical performance hit since afaik that redirect is all handled in the kernel.

share|improve this answer

Your Answer


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.