PirateBox sur RaspberryPi

De Centre de Ressources Numériques - Labomedia
Aller à : navigation, rechercher

Références génériques

PB on Wifi + Ethernet

 ad-hoc: nano /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
   wireless-channel 1
   wireless-essid PIWI
   wireless-mode ad-hoc
auto eth0
auto wlan0
iface wlan0 inet dhcp
   wpa-ssid ESSID
   wpa-psk PWD

Config Réseau wifi WPA2 à la main

soit créer un fichier /etc/wpa_supplicant/wpa_supplicant.conf ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1


   ssid="Your SSID Here"
   pairwise=CCMP TKIP
   group=CCMP TKIP


  • Méthode speed :
sudo nano /etc/network/interfaces

Replace it with the following profile:

auto wlan0
iface wlan0 inet dhcp
wpa-ssid [ESSID]
wpa-psk [PASSPHRASE]
  • Méthode 100% manuelle
sudo ifconfig <interface> down
sudo dhclient -r <interface>
sudo ifconfig <interface> netmask up
sudo route add default gw
sudo iwconfig <interface> essid "ESSID_IN_QUOTES"
sudo iwconfig <interface> mode Managed

si DHCP wpa

sudo wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0
sudo dhclient wlan0
ping x.org


# PB de routage quand connexion simultannée eth0 et wlan0
# sudo route add default netmask gw wlan0
# sudo route add default netmask gw wlan0
# dernière ligne indispensable pour routage net ok à conf avec eth0 up ...
# $ route
# Table de routage IP du noyau
# Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
# default         bbox.lan   UG    0      0        0 wlan0
# default         bbox.lan         UG    0      0        0 wlan0
#     *        U     0      0        0 wlan0


If when using static IP addresses you are getting a problem with name resolution, you will have to specifiy specific dns (domain name servers) in order to translate URLs to IP addresses. Unfortunately there is not an easy way to configure this from the command line. This requires that you edit the /etc/resolv.conf file and manually enter the domain name server(s) you want to use. In many cases users can specifiy their router, their internet service providers dns servers, or use opendns (or use all three). Up to three nameservers can be specified.

sudo nano /etc/resolv.conf

Configuration utilisateur lighttpd et piratebox.conf


user:pi group:pi

dans /opt/piratebox/conf/lighttpd/lighttpd.conf et ../piratebox.conf (en bas du fichier)