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?

1 Answer 1


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .