HOWTO: Sharing the Public folder of your Mac on the Internet | Flavio's blog
 

HOWTO: Sharing the Public folder of your Mac on the Internet

folder sharing on Mac OSX

Many, if not all, of those using a Mac, I am aware of the possibility of easy to share folders in LAN, so you can exchange files with other users on the same network.

This is very convenient, but what happens if the user is elsewhere, and so it is not connected to the same LAN (Read: router)?

a VPN? Nah, too complicated.
Simply, We can continue to exploit the protocol afp (Apple Filing Protocol) that, con smb (Samba file sharing), It is one of two sharing protocols adopted by Mac OSX.

So that our computer is visible to a user connected to another place, it is necessary that the following conditions occur:

  • The client needs to know the’host IP address (the, more comfortably, its dynamic DNS address)
  • The porte TCP/UDP must be open on your computer / router host

On the first point, if you use a static IP address do not arise problems, as you are accessible by the same address.

If you use an ADSL home, however, it is likely that your IP address changes every time you restart your modem, making this method impractical.

For this purpose, you can use a service that offers a Dynamic DNS Free (dyndns.it, no-ip.com, duiadns.net, there are so many), and set it up appropriately, so that always points to your current IP address.

The most boring, however, comes after: to make sure that the porte afp e smb are open.

Using a router Apple Airport Extreme, so the following steps are taken from the program “Airport Utility”, but the configuration will be similar for other routers, provided you find the corresponding options.

  • Locate the screen of the router where to set the port forwarding (“Network”, in the case of the Airport Extreme)
  • Write down the IP local client that you want to be accessible from the outside
  • In Idle port forwarding, enter the local IP address of the client (“Private IP address”, in the case of the Airport Extreme)
  • Door UDP private: 137-138
  • Door TCP private: 139, 445, 548
  • We choose numbers at random ports “public” that interface with UDP and TCP ports listed above
  • Door UDP public: 8884-8885 (choices to taste)
  • Door TCP public: 8886, 8895, 8896 (like above)

The private door 137-138, 139 and 445, They serve to make the client connected via smb.
The private door 548 serve per make the client connected via afp, which it is the method we will use in our case.

I decided to open the doors smb in order to make the public folder of the Mac also accessible from Windows client and Android. However, due to a bug in Samba in Mac OSX, this is, to date (fine 2015) it's impossible, and you will be shown an error of wrong username or password. Hopefully we resolved quickly. 🙂

After rebooting the router, we go in the system preferences of Mac we want to share the Public folder, and select “Users and Groups”.

  • We create a new user type “only sharing”, assegniamogli and a user ID and password you prefer.
Account "solo condivisione"

Screen showing an account “only sharing”

The purpose of this account, It is to be used on clients that will access to your Public folder.

For this purpose, make sure that:

  • I group permissions “Staff” folder we want to share (System Preferences -> Sharing) They are set to “Reading and Writing”, so as to allow the user just created to operate in the shared folder.
  • I group permissions “Everyone” the “All” They are set to “No access”, otherwise any user who knows your IP address and port, You can access the shared folder without password.

At this point, the bulk is done!

That will not move to another Mac, connected to another network, and go “Finder”->”Or”->”Connecting to server”.

Type the IP address or dynamic DNS host, in the form:

afp://YOUR-DNS-O-ipaddress:8896

where 8896 TCP is the public that you have chosen above, and it refers to the protocol afp.

If everything went correctly, the public folder of your Mac will be mounted in the Finder, and you operarvici as you see fit, as if it were a shared folder on LAN! 🙂

 

0 Comments »

Please accept third-party cookies to be able to comment on the post! The CHANGE COOKIE CHOICES button is located in the footer of the site. / In order to comment this post, please accept the third party cookies! The button CAMBIA LE SCELTE DEI COOKIE is in the footer of the website.