Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 192.168.1.2

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

share|improve this answer

Your Answer

 
discard

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.