PirateBoxLaptop DIY

From David Darts Wiki

Jump to: navigation, search
This page is an extension of PirateBox_DIY and provides some preliminary technical information about how to run PirateBox directly on a laptop. For more information about the PirateBox project, check out the main PirateBox page, the PirateBox photo gallery and this short video demonstration for more details. Also, be sure to check out the new PirateBox Forum.

File:PirateBoxLaptop1.jpg


Contents

Overview

A number of people have asked if it is possible to run PirateBox on a laptop and the short answer is yes. Benoit Bégué has written a script for installing PirateBox directly on an Ubuntu netbook/laptop. He's tested it on an EeePC 901 though it looks easy to adapt to other systems. You can find more info on his blog.

I've started a PirateBox Forum thread about this project - so feel free to discuss Benoit's script and related work there.

Here are some general thoughts about setting up PirateBox on a Linux laptop...

Linux

Networking

The Python web server that serves up the PirateBox web interface will run on almost any flavor of Linux so at this point it's just a matter of setting up networking.

The basic networking workflow will look something like this:

  • 1. Set the laptop up as a gateway (via dnsmasq)
  • 2. Configure the firewall settings.
  • 3. Set the iptables to reroute any port 80 traffic from the wireless interface to the Python server. The intrepid Christiane Ruetten has shared a sample command that should accomplish the rerouting.
iptables -t nat -A PREROUTING -i <yourwifidevice> --protocol tcp --match tcp --destination-port 80 -j DNAT --to-destination <yourlocalip>:80

Please post your suggestions and ideas in the comments and I'll add any relevant info to the section above.

Windows

Davo 1111 has developed a 'pirate box' template based on web-server software called HFS (see the installation instructions below). Joseph Di Carlo has since taken Davo 1111's concept and developed it further.

Joseph says:

I took the idea of using HFS, and made my own "kit" for it. All you have to do is put it on the computer, open the PirateBox.exe file and everything is pre-configured to load. Included is a zip folder with all the necessary files. You just have to use the router from the original box to get it to auto forward. My version includes a "chat" feature also, which allows ONLY connected users to talk to each other via the PirateBox, this could also be implemented in the original, since the chat program doesn't require a server.

Joseph also notes:

I forgot to add a specific directory, unfortunately HFS doesn't support uploading to the root directory so files will have to upload to a folder inside the PirateBox folder. Although there's a simple fix, make a folder inside the PirateBox folder, then drag that onto HFS, it will ask if its a "Real" or "Virtual" folder, just click Real and make sure the folder is labeled properly (i.e.: Shared Files, etc...). You can right-click the folder in HFS and click "Comment" to add a note underneath.

You can download Joseph's package here: http://daviddarts.com/piratebox/PirateBox_0.2.7z


Instructions for installing Davo 111's HFS powered PirateBox

  • 1. Unzip this file http://daviddarts.com/piratebox/PirateBox_0.1.7z to your C drive root directory
  • 2. open up HFS (or download it for free off the internet) and click "unblock from firewall" if a dialogue appears
  • 3. Open up "pirate box.txt" - select all (CTRL + A) then copy (CTRL + C)
  • 4. Go back to HFS and click "menu" then "EDIT HTML TEMPLATE"
  • 5. Click in the text box (where the code is), Select All then paste code over the top
  • 6. Hit APPLY then OK
  • 7. Click 'menu' then 'load file system' and select "PirateBoxHFS.vfs" from C:/PirateBox/

See readme for more instructions.

Please post questions in comments.

Networking

The next step is to find a way for a Windows computer to start its own network and forward users to localhost:80.

A few submitted ideas...


Personal tools