Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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'm using a debian as a router with nat configured. How can I set up port forwarding, to set an rdp server on the local network for example?

share|improve this question
up vote 2 down vote accepted

The keyword you're looking for is 'Destination NAT' aka DNAT.

I assume you're using plain iptables here and that you've already set up SNAT (to route back). Then just do something like this:

# iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 3389 \
  -j DNAT --to-destination

where eth0 is your WAN interface and is some address in your local network.

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.