I'm using my MBP as a media server, and I'm connecting to it via my MBA through AFP (settings can be found in "File Sharing" tab in System Preferences).

This works fine if I am connecting locally, but I would like to be able to connect over the internet from anywhere.

The other problem is that the MBP is using DHCP and I'd rather not use VNC.


Solution 1:

If you setup DynDNS and make sure that your router, firewall etc all are passing TCP port 548, you'll be able to connect from the DynDNS host/domain you create.

AFP over the public Internet isn't a great solution for anything other than very minor, lightweight file transfers, however, and if you're expecting more than a few concurrent users you should really consider a better protocol, such as WebDAV or (S)FTP, much less Dropbox, S3, Box.com, etc.

Solution 2:

AFP works over the internet assuming that port 548 is not blocked by your ISP. If you are using a private IP behind a NAT you'll need to forward port 548 to the computer that you want to connect to on the router. Using DHCP makes this much more difficult. If the DHCP requirement is so that your computer can join other networks easily, you might want to create a DHCP reservation for your computer on the router so that it always receives the same IP address.

That being said, the AFP experience in the Finder is pretty poor with a slow connection to the server (which is common when connecting over the internet). Using SFTP (really SSH/Remote Login) or another protocol and a standalone client app such as Transmit or Cyberduck would be a much more responsive experience, but not as integrated as the Finder and AFP.