Book Image

Raspberry Pi for Secret Agents - Second Edition

By : Stefan Sjogelid
Book Image

Raspberry Pi for Secret Agents - Second Edition

By: Stefan Sjogelid

Overview of this book

Table of Contents (12 chapters)
Raspberry Pi for Secret Agents Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Turning the Pi into a Wi-Fi hotspot


Let's say you're out in the field with a couple of fellow agents and you want to quickly put up a network for your computers, maybe even share an Internet connection together; your Pi equipped with a Wi-Fi dongle can easily be made into a makeshift access point. Follow these steps to set up your hotspot:

  1. First install the required software with the following command:

    pi@raspberrypi ~ $ sudo apt-get install hostapd bridge-utils
    
  2. Next we need to prevent Raspbian from interfering with the Wi-Fi interface. Open up /etc/network/interfaces for editing:

    pi@raspberrypi ~ $ sudo nano /etc/network/interfaces
    
  3. Find the block that starts with allow-hotplug wlan0 and put a # character in front of each line, like we've done here:

    #allow-hotplug wlan0
    #iface wlan0 inet manual
    #wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    #iface default inet dhcp
  4. Optionally, if you would like to share a wired Internet connection with the wireless clients, add the following three lines...