Skip to main content

Your first PiRogue on a Raspberry Pi

Beginner tutorial · written by Esther Onfroy

In this tutorial, we will build a PiRogue from a Raspberry Pi: we will flash PiRogue OS on a micro SD card, boot the PiRogue, install its software, connect a first device to its Wi-Fi network and watch its traffic appear in the dashboard.

The PiRogue

note

This tutorial uses a Raspberry Pi. To install a PiRogue on a computer or a server instead, see Install a PiRogue. To learn what a PiRogue is used for, read What is a PiRogue?.

The hardware you need​

In addition to a computer and an Internet connection, you will need, at least, a Raspberry Pi (+ its power supply), a micro SD-card and an ethernet cable.

Pick a Raspberry Pi​

First, you need a Raspberry Pi. We support the following versions of Raspberry Pi:

  • Raspberry Pi 3 Model B 1
  • Raspberry Pi 3 Model B+ 1
  • Raspberry Pi 4 Model B (1GB) 1
  • Raspberry Pi 4 Model B (2GB) 1
  • Raspberry Pi 4 Model B (4GB)
  • Raspberry Pi 4 Model B (8GB)
  • Raspberry Pi 5 (Experimental Support) 2

1 Not all services such as Suricata can be run on these devices due to limited memory.
2 We are actively developing Raspberry Pi 5 support. Download the experimental PiRogue OS version for Raspberry Pi 5 from our download page.

If you want to buy a Raspberry Pi, visit the rpilocator website to check for availability.

Power supply

Be sure to have an appropriate power supply for your PiRogue. If you don't know what to choose, pick the official Raspberry Pi power supply.

Limitations

Raspberry Pi devices have slower, more power-efficient processors, limited memory, and limited onboard WiFi throughput compared to conventional computers. These limitations can potentially affect their performance when running demanding tasks. Due to the limited performance of Raspberry Pi devices, we recommend using PiRogue with up to 2-3 devices connected to the Wi-Fi access point simultaneously.

Suricata, the Intrusion Detection System (IDS) and network security monitoring engine, requires significant system resources. It needs enough memory to hold rules and process large volumes of network packets. To conserve resources on devices with limited RAM, Suricata is automatically disabled on systems with less than 2.5 GB of RAM. This limitation is set in the file /etc/systemd/system/suricata.service.d/override.conf.

Pick a micro SD-card​

Secondly, you need a SD-card to run your PiRogue. The SD-card has to be large enough to store the operating system and all the data generated by the PiRogue itself. By default, it stores 5 days of network traffic history.

You may choose:

  • a 32 GB micro SD-card for regular use
  • a 64 GB micro SD-card if you plan doing long runs, analyzing the traffic of multiple devices simultaneously

For a faster booting experience and improved disk write performance, invest in a high-quality micro SD-card from a reputable brand. Look for one with Application Performance Class 1 (A1) and Speed Class 10.

Pick an Ethernet cable​

In order to connect the PiRogue to the Internet, you should have an ethernet cable connecting your PiRogue to your network. A simple cat. 5 ethernet cable will do the job.

Install PiRogue OS​

Get PiRogue OS​

PiRogue OS is periodically released. The OS is pre-configured so you just need to flash it on a micro SD-card. The image (the binary file to be flashed on the SD-card) is compressed. The file you have to download on your computer has a name following this schema PiRogue-OS-<Debian major version>-<supported hardware>-<year>-<month>-<day>.img.xz.

Download the latest version of PiRogue OS →

Check the integrity of the image​

Once you have downloaded the image, you can check its integrity (check if the file has not been modified or corrupted) by comparing its SHA256 and the SHA256 displayed on the GitHub page. If both SHA256 are the same, the file you downloaded has not been tampered.

To compute the SHA256 of the file you downloaded, run the following command in a terminal:

sha256sum [image file name].img.xz

Replace [image file name].img.xz with the image file you just downloaded.

Set up your SD card​

Advanced Linux users can use a combination of xz and dd commands to flash their SD-card.

We recommend downloading and installing Balena Etcher on your computer. Run Balena Etcher as administrator. This software allows you to flash compressed images; however, if you encounter any difficulties, uncompress the image file before flashing.

Please follow the steps outlined in the screenshots below for successful completion.

Balena Etcher step 1 Balena Etcher step 2 Balena Etcher step 3 Balena Etcher step 4 Balena Etcher step 5 Balena Etcher step 6

Once the flashing is complete, eject the SD-card from your computer.

Set up the PiRogue​

Insert your freshly flashed micro SD-card into the PiRogue, plug the ethernet cable to the PiRogue. Remember, this cable connects your PiRogue directly (or through network switch) to your ISP router.

Caution

To operate properly, your PiRogue needs to have Internet access.

First boot​

First, check that the SD card is correctly inserted into the appropriate slot of your PiRogue and the ethernet cable is properly connected. Then, plug the power supply. Wait a few minutes before trying to access your PiRogue.

Now, connect to your PiRogue using SSH.

ssh pi@pirogue.local

Type raspberry which is the default password of the user pi and press Enter.

Once connected, you have to finalize the installation of your PiRogue.

Firstly, you'll be asked to change the Unix password, the new password you've set replaces the default one. Once you have change the Unix, you must reconnect to your PiRogue with SSH.

Secondly, you have to install PiRogue packages and features. To do so, you need to run the following commands on your PiRogue. Copy and execute each command separately one by one:

Command LineDescription
sudo apt updateGets the latest versions of the available packages
sudo apt dist-upgrade -yUpgrade the entire operating system and all additional installed software
sudo apt install pirogue-base -yInstall the PiRogue packages and features
sudo rebootReboot the PiRogue

During the installation, if asked, you will have to answer:

  • No to save firewall rules for IP v4
  • No to save firewall rules for IP v6
  • Yes to allow non-root users to capture network traffic

Allow non-root users to capture network traffic

Caution

If you're setting up the PiRogue in the context of an organization at your office or your lab you will have to enforce your internal security policies and guidelines. At least, change your password using the passwd command.

After the reboot, wait a few minutes before going on.

Telemetry

The PiRogue sends a minimal daily telemetry report, enabled by default. You can opt out at any time.

Get the passwords of your PiRogue​

The passphrase of the Wi-Fi network and the password of the dashboard were randomly generated during the installation. Connect to your PiRogue with SSH again and display them:

pirogue-admin-client wifi get-configuration
pirogue-admin-client dashboard get-configuration

Note the ssid and the passphrase of the Wi-Fi network, and the password of the dashboard.

Connect a first device​

On a phone or a laptop, connect to the Wi-Fi network of your PiRogue with the SSID and the passphrase you just noted. Browse a few websites, so that there is some traffic to look at.

Open the dashboard​

On your computer, open https://pirogue.local/dashboard in your browser. The PiRogue uses a self-signed certificate: your browser warns you about it, accept the warning for now. To get rid of it later, trust the certificate of your PiRogue.

Log in with the user admin and the password of the dashboard.

At the first start, the dashboard looks empty: it takes around 4 minutes before the first network flows appear. Wait 5 minutes and refresh the page with the F5 key.

pirogue.local does not answer?

Find the IP address of your PiRogue with the command ping -c1 pirogue.local from your computer, or in the list of connected devices of your router, and use it instead of pirogue.local.

The dashboard now shows the traffic of the device you connected:

  • at the top, general statistics: the number of connected devices, of security alerts, of network flows and of contacted domains, and the volume of traffic
  • the world map of the servers your device talked to
  • the list of flows, one row per communication between your device and a server, with the application and the domain involved
  • the list of security alerts, raised when the traffic matches a known threat. It is probably empty, which is good news

The flows panel of the PiRogue&#39;s dashboard

What you have learned​

You built a PiRogue from a Raspberry Pi, connected a device to its Wi-Fi network, and saw the traffic of this device in the dashboard.

To continue: