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 have a Mac with Vine server installed sitting inside the firewall (actually a router connect to cable model, and has a LAN to internal).

What if I want to remote desktop to Vine server from internet, how should I configure my router? Here's my thoughts:

  • Allow port XXXX
  • Port forwarding XXXX to the Mac

Questions:

  • What are the ports need to be open and forwarded?
  • Is there anything missed?

Thanks.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can set the port Vine uses in the preferences. Be aware that it has a persistent server mode and a manual mode. It defaults to 5900, but you van easily change that to 5901 or whatever you like. The VNC server built into the OS uses 5900, so I use 5901 for Vine.

You just need to open a port on your router to point to the IP of the Mac. You will want to give the Mac a static IP. If you have trouble opening the port provide us with the model of router you have.

Also since Vine (or any flavor of VNC) is not secure I'd suggest opening a port to SSH on your Mac and tunnel your Vine connection over SSH. You can use a command like this to connect, although change the 5900s to the port you use. If you open the port to SSH you don't need to open the port for Vine.

ssh -L 5900:127.0.0.1:5900 username@public_IP

After running that command on the the VNC client computer you can then VNC to localhost and your session will be secure. You could accomplish this in safari by typing vnc://localhost

Also, instead of using your public IP you could instead get a DynDNS.com account so when your ISP gives you a new IP you'll still be able to connect. Your router may support DynDNS updates automatically, or you can get their app to keep up to date.

You would then use:

ssh -L 5900:127.0.0.1:5900 username@your_account.dyndns.org

share|improve this answer
    
Thanks for the awesome answer! –  Stan Jul 27 '10 at 2:02
1  
Sure. Also, if you're using the built in screensharing app from a Mac client it won't like the attempt to connect to localhost. To allow it use defaults write com.apple.ScreenSharing skipLocalAddressCheck -boolean YES –  ridogi Jul 27 '10 at 3:11
    
My router is D-Link DI-524. A quite old model. –  Stan Jul 27 '10 at 6:38
1  
The end of this article explains how to set up a port forward on that model. portforward.com/english/routers/port_forwarding/Dlink/DI-524/… You will want to use 22 instead of the ports they mention. Also, the type for SSH is TCP. –  ridogi Jul 27 '10 at 15:56

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.