Compare commits

..

10 Commits

Author SHA1 Message Date
c31b74884a Fixing links in the readme.md 2023-05-18 15:16:23 +00:00
f58d3be131 Reviving the project, updating the Readme first 2023-05-18 15:15:33 +00:00
b7f3651c82 Fixing small issue with setup.sh 2020-12-27 16:22:02 +00:00
2e3150021d Reshaping a bit 2020-12-27 15:37:01 +00:00
082094ad08 Adding versions.md 2020-12-16 19:09:01 +00:00
be1850b0b5 AP up and running 2020-12-16 17:08:04 +00:00
6ff3eebcb3 Adding config files 2020-12-16 14:24:27 +00:00
64fcf1efb8 Further edits on readme.md 2020-12-11 09:51:12 +00:00
d2600ac1a0 Readme fixes 2020-12-11 09:50:19 +00:00
681ef1776d A little cleanup 2020-12-11 09:43:16 +00:00
10 changed files with 135 additions and 7 deletions

View File

@ -1,3 +1,22 @@
# v0xb0x
v0xb0x is a setup tool to make your Raspberry Pi (4B+ and Zero W) into either a pirate box or a MESH network for 1st responders or similar.
This is a project I thought of after the [Egyptian revolution of 2011](https://en.wikipedia.org/wiki/2011_Egyptian_revolution), I wondered how data and information could be transferred easilly between members of the protests without the need of infrastructure. Since Raspberry Pi machines have been so popular and the Raspberry Pi Zero W can be run on battery power I mixed these two things together and started learning about "Pirate boxes".
None of the ones I found were actively maintained nor did they have a recent release, so I decided to start one myself.
## What is a Pirate Box?
A pirate box is a device that can be used to share files and chat with people around you without the need of an internet connection. It is a device that creates a local network that you can connect to and use to share files and engage in chat with other people connected to the same network.
## What is a v0xb0x?
The name of it comes from the latin word vox, which means voice, and the 0 (zero) instead of the letter o is referring to not having a voice to speak with. The idea is that this device will give a voice to the people who don't have one, and allow them to share their voice with others.
## Installation
### Requirements
- Raspberry Pi Zero W
- Micro SD card
- Micro USB cable
- Power bank
- USB WiFi adapter (optional)
### Steps
1. Have a ready Raspberry Pi Zero W with a Micro SD card flashed with the latest Raspbian image.
2. SSH into the Raspberry Pi Zero W and run the following commands:
```sh v0xb0x-setup.sh```

3
configs/dhcpcd.conf Normal file
View File

@ -0,0 +1,3 @@
interface wlan0
static ip_address=10.1.1.1/24
denyinterfaces wlan0

2
configs/dnsmasq.conf Normal file
View File

@ -0,0 +1,2 @@
interface=wlan0
dhcp-range=10.1.1.10,10.1.1.210,255.255.255.0,24h

13
configs/hostapd.conf Normal file
View File

@ -0,0 +1,13 @@
interface=wlan0
hw_mode=g
channel=6
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ssid=v0xb0x
wpa_passphrase=x0bx0v

View File

@ -0,0 +1 @@
DAEMON_CONF="/etc/hostapd/hostapd.conf"

View File

@ -1,17 +1,48 @@
# Features and plans
This is just where I jot down things I want the system to have.
Not here in any special order, just ideas and thoughts on the system.
# Hardware
* This should all run on a Raspberry Pi Zero W.
* 1GHz 32bit CPU
* 512MB RAM
* 16GB "disk" (microSD card)
* Powered by a USB battery bank (10-20k mah)
# The list
* MESH mode
# TODO
* HTTP Server
* PHP must be running
* Create script that creates a user for you for FTP
* FTP Server
* pure-ftpd?
* Virtual users created via webscript, unique dirs only accessable by them.
# FUTURE
* MESH mode ?
* Perhaps a fork off this project?
* Offer to put device in MESH mode for 1st responder type scenarios
* Link for info on MESH: https://github.com/binnes/WiFiMeshRaspberryPi
# DONE
* WiFi AP mode
* Software: hostapd & dnsmasq
* Enable AP mode with WPA2-PSK for encrypted communication
* Enable AP mode without encryption for open connections
* HTTP Server
* run server in HTTPS mode
* Offer blind drop-uploads (what max size?)
# PLANS
* What do we need at first?
* OS side
* Start machine, put WiFi into AP mode X
* Have a DHCPD to supply IPs to clients X
* Have a DNS to route everything to the local website?
* Offer FTP for large files?
* MAX filesize on the MicroSD cards is 4GB (FAT32 limit)
* Make another partition on the card with ext3/4 ?
* Web side
* Offer up a simple PHP website to create a FTP user and password

3
http/index.php Normal file
View File

@ -0,0 +1,3 @@
<?php
?>

View File

@ -1 +0,0 @@
# todo list

51
v0xb0x-setup.sh Normal file
View File

@ -0,0 +1,51 @@
#!/bin/sh
# Update the system first
echo "We are about to set up a v0xb0x on your Raspberry Pi\n"
echo "First we need to upgrade the system to the current Raspbian and install core services for this to work.\n"
echo "If you encounter any issues, please let the developers of v0xb0x know on github.com.\n"
echo "\n"
read -n1 -s -r -p $'Press any key to continue...\n' key
clear
apt-get update
apt-get dist-upgrade -y
apt-get install -y hostapd dnsmasq
apt-get install -y apache2 php libapache2-mod-php
apt-get install -y mariadb-server-10.0
apt-get install -y gpm
apt-get install -y pure-ftpd
# lock down MySQL
echo "We are now going to secure the MySQL installation, please go through the following questions and answer accordingly.\nContinuing in 15 seconds. "
sleep 15
mysql_secure_installation
# Enable mod-rewrite for Apach2
a2enmod rewrite
systemctl restart apache2
systemctl stop hostapd
systemctl stop dnsmasq
systemctl unmask hostapd
systemctl enable hostapd
# Modify /etc/dhcpcd.conf
cat ./configs/dhcpcd.conf >> /etc/dhcpcd.conf
# Make new /etc/dnsmasq.conf
mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
cat ./configs/dnsmasq.conf >> /etc/dnsmasq.conf
# Create a new hostadp.conf
cat ./configs/hostapd.conf > /etc/hostapd/hostapd.conf
# Add our config to the default hostapd.conf
cat ./configs/hostapd.default.conf >> /etc/default/hostapd.conf
systemctl start hostapd
systemctl start dnsmasq
# Pure-FTPd settings
touch /etc/pure-ftpd/pureftpd.pdb

6
versions.md Normal file
View File

@ -0,0 +1,6 @@
# Full versions (to be) released (newest at top)
---
* 0.1a
* AP enabled "v0xb0x" with passkey "x0bx0b" (v0xb0x in reverse)
* DHCP serves IP addresses from 10.1.1.10-210
* hostname is set to v0xb0x