Port forward to different port number

3

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.

ThatGuyYouKnow

Posted 2010-04-05T01:36:50.867

Reputation: 141

i'm pretty sure this has been asked before, but my search-fu is failing at the moment. – quack quixote – 2010-04-05T02:39:23.543

I couldn't find one either...weird. – ThatGuyYouKnow – 2010-04-05T03:08:48.213

Answers

1

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)

user33234

Posted 2010-04-05T01:36:50.867

Reputation:

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 – 2010-04-12T02:19:09.757

0

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

Simulator: http://support.dlink.com/Emulators/wbr2310/adv_virtual.htm

ghoppe

Posted 2010-04-05T01:36:50.867

Reputation: 6 124