Warning: Declaration of action_plugin_authad::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/netsh21311/html/piratebox/dokuwiki/lib/plugins/authad/action.php on line 89

Warning: Declaration of action_plugin_discussion::register(&$contr) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/netsh21311/html/piratebox/dokuwiki/lib/plugins/discussion/action.php on line 1464
script-package_for_debian_based_systemes [Matthias' Piratebox-Scripts]

User Tools

Site Tools


Piratebox scripts for debian based systems

Based on this blog-entry, I started to create a script-collection for using the piratebox easily on laptops. Mainly I'm focused at the eeePC.

These scripts are quite outdated. The current version runs with lighttpd as a webserver and more enhanced features. You can still use this stuff, i.e. for using grml to setup a quick PirateBox.

:!: For running these Scripts on OpenWRT Routers, use this OpenWRT Package: mkPirateBox :!:

For more information look wiki of David Darts. For improvements or discussions you can find the forum here

The currently released files are:

Installtion Guide

What do you need?

  • Debian based System (on other distributions, you may have to change the init.d script)
  • Python
  • hostapn (if you don't need to be an APN, you can switch this setting off in piratebox.conf)
  • dnsmasq (if you don't need to act like an dhcp and dns, you can switch this setting off in piratebox.conf)

After checking there requirements:

* Unpack the tar:

# tar xf piratebox*.tar 
(If you have a tar.gz file use tar xft piratebox*.tar.gz )

* Copy over the piratebox folder into /opt/ :

# sudo cp -rv piratebox /opt 

* configure your share-folder (where should the uploaded file put to?) link or mount your destination folder to /opt/piratebox/share

   # rm /opt/piratebox/share & ln -s /mountpoint /opt/piratebox/share
   # mount /dev/usbstick /opt/piratebox/share

* Create a symlink /opt/piratebox/init.d/piratebox /etc/init.d/:

# sudo ln -s /opt/piratebox/init.d/piratebox /etc/init.d/piratebox  

* (optional) Add piratebox to you runlevel:

# sudo  update-rc.d piratebox defaults  

* Configurate you personal options in:

# /opt/piratebox/conf/piratebox.conf
# /opt/piratebox/conf/hostapd.conf  

* Copy over the *.htm files from the /opt/piratebox/src/ folder to your share-folder (where your usb-stick is) * Fire up the piratebox with

# /etc/init.d/piratebox start

If it won't work

I can't access no http://piratebox.lan from my local computer

Add the two lines from your /opt/piratebox/conf/hosts file to your local hosts file located at /etc/hosts

Chatbox does not load correctly

If the iframe-shoutbox does not load after sending a message, you should check your hostname-settings at /opt/piratebox/conf/ and /opt/piratebox/conf/piratebox.conf . Both entry have to match! Next step is setting the correct permissions to /opt/piratebox/chat/cgi-bin/data.pso

# chmod 777 /opt/piratebox/chat/cgi-bin/data.pso

I can't see my WLAN-SSID

You can't see the AP?

  1. Check if hostapd is running with
    ps ax | grep hostapd 

    If not, try to find out why it is crahsing with:

    hostapd -dd /opt/piratebox/conf/hostapd.conf
  2. Next step, check if wpa_* programms or wcid are running! wcid can be stopped with
    /etc/init.d/wcid stop

    I made the expirience, that tools like to change the iwconfig-settings

  3. Does your client can use the same wlan-standards (a/g/n) ?

dnsmasq failed to start

If you installed dnsmasq with apt-get, it installed the dnsmasq daemon to your current runlevel automaticly. You have to remove it from your runlevel and stop it

# update-rc.d dnsmasq remove
# /etc/init.d/dnsmasq stop

After this stop and start your piratebox init.d-script again!

hostapd fails

In some cases you need to run the following command first:

# iw phy0 interface add wlan0 type managed

to initialize your interface correctly

I am running ubuntu and need help

Do the following steps before you start the piratebox:

# sudo service network-manager stop
# sudo killall dhclient
# sudo killall dnsmasq
# sudo /opt/piratebox/init.d/piratebox start

This disables all ubunut-included features in auto-(re)config your network. Sometimes you have to do some firewall stuff:

# iptables -t nat -A PREROUTING -i wlan0 --protocol tcp --match tcp --destination-port 80 -j DNAT --to-destination
script-package_for_debian_based_systemes.txt · Last modified: 2015/12/09 22:52 by matthias