[An Idea] Wifi Piratebox Cloning

Posted by pabell 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
[An Idea] Wifi Piratebox Cloning
May 03, 2012 05:57PM
Wifi Cloning


This idea involves taking an existing Piratebox, and using it to clone another Piratebox over wifi.

How it would work.

Piratebox 1 - Primary Piratebox
This Piratebox has the latest firmware and dependency files stored on its flash drive It has messing active on it.


Piratebox 2 - Secondary Piratebox

It does not have the latest firmware on it I is a "regular piratebox"


How it would work

When Piratebox 1 “discovers” Piratebox 2 they “talk.” to each other. Piratebox 1 does a version check of Piratebox 2.
The version check shows that Piratebox 2 does not have upgraded firmware.

Pirate box 1 notifies the owner of the box through some sort of messaging system, Notifies the owner of Piratebox 2 that it would like to upgrade Piratebox 2. If the owner accepts the upgrade offer, Then Piratebox 1 Sends its files over to Piratebox 2.


Results
This would force Piratebox 2 to reboot and run an upgrade script. When the reboot is finished, Piratebox 2 now has the latest Firmware and can upgrade other pirateboxes that it may discovers.

nothing to see here, no longer here.
Re: [An Idea] Wifi Piratebox Cloning
May 03, 2012 06:39PM
This is similar to meshing which Matthias has been working on, look up B.A.T.M.A.N. and do some research on that smiling smiley
Re: [An Idea] Wifi Piratebox Cloning
May 03, 2012 06:44PM
TerrorByte,
Yes I spoke to Matthias about this I am currently researching B.A.T.M.A.N spinning smiley sticking its tongue out I got the idea partly because you guys are talking about meshing, And my thoughts were if units are going to share files, they may be able to share system files as well.

nothing to see here, no longer here.
Re: [An Idea] Wifi Piratebox Cloning
May 05, 2012 07:59AM
Yes, he talked to me smiling smiley
I like this idea. Ok, you won't be able to flash a router completly... but it may be possible to distribute the piratebox_img.gz files.
There shouldn't be an automatic update.

Updates of the piratebox-package itself or image won't be possible because of the lack of internet-access.
Re: [An Idea] Wifi Piratebox Cloning
May 05, 2012 09:54AM
Matthias,

If the the second device is already running piratebox, Distributinghe piratebox_imga.gz is all that is needed.

Also could piratebox 2 treat Piratebox1 as a server? this way no internet would be needed.

Where exactly do these "dependencies" come from? is it multiple servers or one?

nothing to see here, no longer here.
Re: [An Idea] Wifi Piratebox Cloning
May 05, 2012 11:32AM
Dependencies came from the package systems of OpenWRT where additional stuff is loaded into the box.
Re: [An Idea] Wifi Piratebox Cloning
May 05, 2012 12:25PM
Hmm,
I have a lot more questions, but I will try to find a creative solution to this issue.

nothing to see here, no longer here.
Re: [An Idea] Wifi Piratebox Cloning
May 06, 2012 05:32PM
Maybe a clever version of PirateBox-Laptop-Script and MR3020 maybe solve a few Install-Problems... but not easy to find the correct setup.
Re: [An Idea] Wifi Piratebox Cloning
May 09, 2012 05:37AM
When I first read this, I thought it was insane. (I'm going to let any passer-by reflash my device?)

But with sufficient crypto it isn't too bad.

1) We put GPG or openssl on every piratebox, as well as an approved Matthias developer public key.
2) Matthais signs all release files, and a signed file that has the version number and release notes.
3) Machines broadcast the signed release files (forban?),
4) If a machine is out of date, they request the .gz and the signature file for the .gz
5) Receiver validates signature and installs.

The dependencies are harder, since openwrt & opkg don''t have signing. You'd have to provide a second signed loopback archive containing all of the packages and a line to add to opkg.conf as part of the install. Technically not very hard, but keeping versions up to date would be.

It might be easlier to write an updater script that runs on a laptop: Given an SSH connection to a pirate box, inject the script, have opkg pull files and upgrade from the laptop. No fancy code needed, and the security comes down to the root password.
Re: [An Idea] Wifi Piratebox Cloning
May 09, 2012 06:42AM
Mh, nice idea with signed gpg stuff! (I already have a everything needed winking smiley )

> It might be easlier to write an updater script that runs on a laptop
Yes.