Pi Shield

Pi Shield

Introduction: Pi Shield

What it does: once setup, your Pi will broadcast a WiFi network. Any devices, such as phone/tablet/laptop, that connects to this WiFi will be shielded from inappropriate content. You can customize what will be filtered out based on banned site name, banned words, banned extension.

The sketch above outlines the typical network configuration for this project. The PiShield is wired to your router and acts as wifi access point. Any devices connected to this wifi network will be shielded. Other devices connected directly to the router will not. Once connected to the PiShield wifi, there is no need for specific configuration on the laptop/table/phone;
Pi Shield
they will be protected right away. This means that visiting friends will also enjoy protection transparently.

Let’s get into it. Grab an SD card and install your favorite image. The info in this post were based on a Raspbian based distribution but should work on other with some tuning.

I picked the Raspian Jessie Lite as there is no need for a desktop environment on this project.

You may want to change the default password and expand the SD card before we install the required packages at the command prompt:

sudo apt get install hostapd dnsmasq iptables squid3 dansguardian

hostapd is the daemon that will handle the wireless Access Point (ie allow devices to connect to your Pi through wifi)

dnsmasq and iptables will allow routign of the web traffic so that the devices can reach the Internet through your Pi

squid3 and dansguardian will filter out any web content unsafe for young eyesStep 2: Set Up the Access PointConsider getting a wifi dongle with an external antenna so that you get better range for your wifi network.

I am running a TP LINK TL WN722N. Works like a charm.

Please going any further, run two checks on your wifi dongle:

/! : ensure that your wifi dongle offers Access Point. Some do not.

To check this run iw list grep A 8 modes:at the command line. If AP does not show up in the supported modes, you are out of luck and will need another dongle.

/!: ensure that your wifi dongle runs on a 80211 driver.

To check this run dmesg grep i 80211 at the command line. If nothing shows up, you are on your own. There is still hope but you will probably need to download other version of hostapd; this tutorial may help.
Pi Shield