3

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

2

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.

You must log in to answer this question.

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