IPC using Dropbox

Dropbox LogoSome weeks ago I’ve installed Dropbox to use it for backup in several Debian boxes. As I was installing it I thought this setup could be useful as a inter process communication mechanism for processes running on differente boxes.

If you have this constraints:

  • Processes in several boxes where some processes’ outputs are another’s inputs.
  • The boxes have no direct connection between them.
  • All of them have internet access.
  • Don’t want a process to act as a master node, centralizing  the communication among the other processes.

Under this constraints, some processes leave their outputs on files, and the ones needing this as input wait until the files are there. I don’t know whether there are limitations on the amount of machines which can run with the same Dropbox account.

There are already trojans using Facebook (like WhiteWell) or Twitter for command and control. ¿When will a trojan/botnet appear using Dropbox?

While we wait for these trojans/botnets, I tell you how I’ve installed Dropbox on Debian.

Installation

Found two guides in the Dropbox wiki:

I think it’s better to follow the first guide and in case of troubles, switch to the second one.

The installation was done in two Debian (testing) boxes and everything run smooth. I only had to make a few modifications (which are in the first guide), but I’tell you anyway what the modifications are:

  • The download link in the guide is for the 32-bit version, here’s the 64-bit one.
  • The guide is to install it on machines without X, but needs to redirect  X connections to another machine during the registration process. This step is not necessary, dropboxd complains it cannot run nautilus, but everything works anyway. The only thing you must do is to visit the activation url shown.
  • This might not be necessary: In one of the boxes there were conflicts with another init.d script. Because the script the guide gave didn’t have a LSB header, so I had to add at the beginning:
    ### BEGIN INIT INFO
    # Provides:          dropbox
    # Required-Start:    $local_fs
    # Required-Stop:
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: starts the dropbox server
    # Description:       starts dropbox using start-stop-daemon
    ### END INIT INFO
    

Configuration

We can now start and stop the service with /etc/init.d/dropbox. As I followed the first guide,  the directory associated with the service is /etc/dropbox/Dropbox and the user dropbox being the owner.

To change the directory, first stop Dropbox and run:

$ wget http://dl.dropbox.com/u/119154/permalink/dropboxdir.py
$ chmod +x dropboxdir.py
$ mv ~/current/Dropbox/directory /foo/bar
$ ./dropboxdir --setfolder=/foo/bar

By default, dropbox listens on port 17500 (tcp and udp). It seems this is for the LanSync feature and didn’t find how to disabling it, so by now I’m blocking the access to these ports with iptables.

Same article, but in spanish

Categorías: Sin categorizar

Leave a comment