> Is it possible to change the Apple RemoteDesktop & VNC ports so that I can
> use NAT port forwarding for multiple computers?
Doesn't your Router allow you to specify
WAN port 5901 goes to 192.168.0.100 port 5900
WAN port 5902 goes to 192.168.0.101 port 5900
...
WAN port 5908 goes to 192.168.0.109 port 5900
This is what I do with my Airport Extreme base station. In the
past I did the same thing with a LinkSys.
You could also use a different VNC server. Vine Server (aka
OSXvnc) allows you to specify a different port.
You could also try some of the ideas presented in the
MacOSXHints.com posting. A few of the replies gives some
interesting approaches:
<http://www.macosxhints.com/article.php?story=20080107061618164>
If none of the above ideas work for you, you could consider ssh
tunneling. the sshd daemon can be specified to start on a
different port.
You could also use an ssh gatway system for your tunneling. That
is to say, setup one system with the router forwarding port 22 to
that system. Then specify your ssh tunnels so that they first
connect to your gateway system which forwards the requests to the
target systems:
ssh -L 5900:target.Mac.ip.addr:5900 \
user...@your.routers.ip.addr
Where your.routers.ip.addr should cause the port 22 connection to
be routed to your Mac which is acting as your ssh gateway. The
target.Mac.ip.addr is the local inside your home IP address
(something like 192.168.0.100, or 10.0.1.100).
The first 5900 is the port your VNC client specifies. The 2nd
5900 is the port your VNC server is using. If you want to have
multiple tunnels going though that gateway and thus startup
multiple VNC sessions
ssh -L 5901:target.Mac1.ip.addr:5900 \
-L 5902:target.Mac2.ip.addr:5900 \
-L 5903:target.Mac3.ip.addr:5900 \
-L 5904:target.Mac4.ip.addr:5900 \
user...@your.routers.ip.addr
Bob Harris
Thanks for your post. This is a good idea for VNC as I can specify the port
On the VNC viewer and map the ports as you suggest, however this wont work
for Apple Remote Desktop as I dont think you can specify the port with ARD.
Any ideas for this?
I cant believe that there isnt some hack to change the ports on the clients.
So change 5900 to 3283 when you create your ssh tunnel. You might
be limited to just one connections at a time, by you can still
connect to different systems though your NAT router.
ssh -L 3283:target.Mac1.ip.addr:3283 \
user...@your.routers.ip.addr
make Apple Remote Desktop connection
end your ARD
exit from your ssh session
ssh -L 3283:target.Mac2.ip.addr:3283 \
user...@your.routers.ip.addr
make Apple Remote Desktop connection
end your ARD
exit from your ssh session
ssh -L 3283:target.Mac3.ip.addr:3283 \
user...@your.routers.ip.addr
make Apple Remote Desktop connection
end your ARD
exit from your ssh session
and your router forwards port 22 to a Mac (or other ssh capable
system) on the same network as your target system.
Bob Harris