Outils pour utilisateurs

Outils du site


piratebox_sur_raspberrypi

PirateBox sur RaspberryPi

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
   address 192.168.2.1
   netmask 255.255.255.0
   wireless-channel 1
   wireless-essid PIWI
   wireless-mode ad-hoc
auto eth0
structure
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 <html>

</html> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1

network={

     ssid="Your SSID Here"
     proto=RSN
     key_mgmt=WPA-PSK
     pairwise=CCMP TKIP
     group=CCMP TKIP
     psk="YourPresharedKeyHere"

} <html>

</html>

  • 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 <html><interface></html>   down
sudo dhclient -r <html><interface></html>\\
sudo ifconfig <html><interface></html>   192.168.1.100 netmask 255.255.255.0 up
sudo route add default gw 192.168.1.1
sudo iwconfig <html><interface></html>   essid "ESSID_IN_QUOTES"
sudo iwconfig <html><interface></html>   mode Managed

si DHCP wpa

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

Routage

# PB de routage quand connexion simultannée eth0 et wlan0
# sudo route add default netmask 255.255.255.0 gw 192.168.1.254 wlan0
# sudo route add default netmask 0.0.0.0 gw 192.168.1.254 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        255.255.255.0   UG    0      0        0 wlan0
# default         bbox.lan        0.0.0.0         UG    0      0        0 wlan0
# 192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0

DNS

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
nameserver 208.67.222.222
nameserver 208.67.220.220

Configuration utilisateur lighttpd et piratebox.conf

mettre

user:pi group:pi

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

piratebox_sur_raspberrypi.txt · Dernière modification : 2019/02/11 15:18 de serge