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 have a router that sets up rules like so:

TCP Any -> 5800
Any -> 5900
UDP Any -> 5800
Any -> 5900
Computer: ip-address

This would allow someone 'outside' to connect to my router's port 5800 and 5900 and forward that to the same port on my computer.

My issue is that I want the 'outside' port to be different without changing the port on my computer.

share|improve this question
i'm pretty sure this has been asked before, but my search-fu is failing at the moment. – quack quixote Apr 5 '10 at 2:39
I couldn't find one either...weird. – ThatGuyYouKnow Apr 5 '10 at 3:08

On my D-Link router, there is an option to set the "public" (outside) and "private" (inside) ports. What router are you using?


share|improve this answer

Investigate using a Linux box as a router. iptables has a REDIRECT target that does just what you are saying, and I use it myself. On my home LAN I like to keep things on standard ports, but don't necessarily want them externally accessible through the same ports. Or sometimes I've chosen a nonstandard port for a service, but want one specific IP to access it through the standard port due to their restrictive policies.

For example, I have my SSH port changed from the default one, but have added a rule in my firewall to redirect port 22 (the standard port ) to this port for a specific IP (which is my school, which blocks my chosen nonstandard port)

share|improve this answer
I figured it out you set each of them to "Any -> " followed by the "external" port and use another setting to change the port used 'internally'. This requires the above rule to become two to be functional. – ThatGuyYouKnow Apr 12 '10 at 2:19

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.