AFP over WAN?

Discussion in 'macOS' started by PXL Creations, Jan 21, 2012.

  1. PXL Creations macrumors member

    Joined:
    Nov 28, 2009
    #1
    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.

    Also, the MBP is running Snow Leopard and the MBA is running Lion, so Back To My Mac won't work.
     
  2. mainstay macrumors 6502

    mainstay

    Joined:
    Feb 14, 2011
    Location:
    BC
    #2
    configure your MBP to receive a statically assigned IP address within your network by reserving its MAC address. this is done in the router, and does not impact the mbp ability to move to other networks (i.e., it is still set to dhcp, but when in your network it will always get the same IP).

    setup a VPN solution. there are lots to choose from.

    forward the appropriate ports through your router and firewalls to the statically assigned address.

    now you have access to your system as if you were there locally.

    a quick deploy vpn is called hamachi and is free and supports Mac.

    ----

    another option would be to remotely control your MBP while on the road, using LogMeIn (free, Mac friendly). This allows control, but no file transfer.

    -----

    another option would be to use something like filezilla and setup an FTP server... which allows file transfer, but no remote control,.==.
     
  3. swiftaw macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #3
    Oops, didn't see that you are running SL. NM.
     
  4. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #4
    This Mac is going to stay stationary, and I already assigned it a static IP. I also set up DMZ for it, to not block connections, but I can't seem to connect to it outside of the network.

    I've been following this guide...

    http://homepage.mac.com/car1son/static_port_fwd_intro.html

    It's old, but it works. So far I've set everything up, including static IP and changing the Mac server port to 8080, but I still can't seem to connect to it outside the network.

    It's hardwired in while my MBA is connecting to it from wifi. It's external IP is the same as my MBA, which is where the problem occurs. What am I doing wrong?
     
  5. mainstay macrumors 6502

    mainstay

    Joined:
    Feb 14, 2011
    Location:
    BC
    #5
    server port to 8080: what does this mean?

    what server?

    what's listening on 8080?

    Usually 8080 is used for web access configuration of say routers (linksys, dlink, etc.) and has nothing to do with afp.

    you need to open the ports for afp (although I'd be careful here... since you don't want to expose your network to the world)...

    I'd vpn in, and then use afp to your local address.
     
  6. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #6
    I changed it while using the guide, http://homepage.mac.com/car1son/change_apache_port.html

    I suppose it doesn't have anything to do with AFP, but I'd rather not use VPN. I find it slow, and if all possible use just AFP.

    The ports are being opened with DMZ... right?

    The main problem is this, why do by my Macs have the same external IP address?
     
  7. mainstay macrumors 6502

    mainstay

    Joined:
    Feb 14, 2011
    Location:
    BC
    #7
    speed will primarily be determined by your upload bandwidth.

    while in the same network, you will both have the same external (internet) IP address.

    if they are both in the same network and they both have the same internal IP (ie. 192.168.1.16) then you have your IP reservation table wrong.

    another possibility why it isn't working is that some people report that their ISP's block ports... perhaps yours is doing this?
     
  8. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #8
    Maybe I've been looking at this wrong then. If I'm in the same network as my computer, I should connect to it via it's local address (192.168.1.100 (in this case)), and if I'm outside of it I should connect to it via it's external IP?

    I want to be able to connect to it via the same IP every time, whether I'm next to the computer or a town away, is this possible?

    But that still doesn't solve the issue of the external IP being the same for that computer. What port do I need to open for it to allow external AFP connections?
     
  9. swiftaw macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #9
    Okay,

    Let's see if I can break this down for you. You home only has one IP address supplied by your ISP. This is your external address. In order to have multiple devices connect to the internet in your home you have a router, which assigns internal IP addresses to each device and then connects them to the outside world.

    In order to access one of your devices from the outside, you need to configure your router to forward the correct ports to the desired device. Thus, when the router sees an AFP request from the outside, it knows where to send the message.

    Then, when you are outside your network, you connect to your external IP, the router sees the AFP request and forwards it to the correct internal IP address.

    For an analogy, think about your external IP address as a phone number, and the internal IP address an an extension. If you're inside the building, you can call another phone just by dialing the extension. If you are outside the building, you have to dial the telephone number and then be forwarded to the correct extension.
     
  10. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #10
    That's a great explanation, It makes a lot more sense now :D

    So what I should be doing is settings my router to forward a port to my static IP computer (MBP), and then access it outside the network by
    Code:
    afp://externalip:porttopro
    ?
     
  11. swiftaw macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #11
    The exact method depends on your type of router, but you need us "port forwarding" or "port mapping" to forward the correct AFP ports to the correct internal IP address.

    The correct AFP ports is TCP 548 I think.

    So you need to tell the router to forward requests to TCP port 548 to 192.168.x.x where this is the internal IP address of your machine.

    Then, when you are on the outside, simply go to Finder->Connect to Server and type afp://yyy.yy.yy.yy

    where yyy.yy.yy.yy is your external IP address.
     
  12. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #12
    Perfect! It's not working. The explanation that you gave really helped.
     
  13. mainstay macrumors 6502

    mainstay

    Joined:
    Feb 14, 2011
    Location:
    BC
    #13
    don't forget that unlike your phone number, your external IP address may change on you.

    so you can use a free dynamic dns service like no-ip.com or dyndns.org to setup an address like:

    pxlcreations.hopto.org which actually points traffic to your changing (dynamic) external IP address.


    so you would type:

    afp://pxlcreations.hopto.org


    but please make sure you have nice username / password settings, as you are opening yourself up to some malicious attacks doing this.

    personally, I'd either use FTP (SSL implicit), VPN, or use a service like DropBox or Box.com or ....
     
  14. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #14
    How would I go about setting up NoIP on my Pro? I looked into dynnsa but they no longer have a free version.
     
  15. mainstay macrumors 6502

    mainstay

    Joined:
    Feb 14, 2011
    Location:
    BC
    #15
  16. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #16
    Ah I've got it working now. How do you get the free DynDNS?
     
  17. swiftaw macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #17
    You sign up for a trial of their paid service, then cancel it, allowing you to keep a free address.
     
  18. PXL Creations thread starter macrumors member

    Joined:
    Nov 28, 2009
    #18
    That's a dumb system... does it at least allow you to pick a better domain name?
     
  19. Ccrew macrumors 68020

    Joined:
    Feb 28, 2011
    #19
    No dumber than opening AFP to the internet without a VPN :p
     

Share This Page