Skip to main content

Configure a PiRogue

This guide shows how to change the configuration of a PiRogue with pirogue-admin-client: the passwords, the Wi-Fi network, the VPN peers, the open ports, the public access and the remote administration. To understand how the administration of a PiRogue works, see Administration.

PiRogue version >=2.0.0

This guide only applies when the package pirogue-base version >=2.0.0 is installed. For older versions, see Configure a PiRogue 1.x.

Use dpkg -l to check what version is installed:

PiRogue version 2.0.2 is installed
$ dpkg -l | grep pirogue-base
ii pirogue-base 2.0.2 all Install all PiRogue packages

Find the operating mode of your PiRogue​

Some sections of this guide only apply to some operating modes. Check the mode of your PiRogue with:

Get the current operating mode
pirogue-admin-client system get-configuration | grep SYSTEM_OPERATING_MODE

In the appliance mode, you can only configure the dashboard and the open ports.

Change the password of the dashboard​

The username of the dashboard is admin.

As the password of the dashboard is randomly generated during the installation, the following command allows you to retrieve it.

Get the password of the dashboard
pirogue-admin-client dashboard get-configuration

The password of the dashboard can be changed with:

Change the password of the dashboard
pirogue-admin-client dashboard set-configuration --password 'mySuperSecretPassword!'

The dashboard is accessible on https://<PiRogue IP address>/dashboard when the PiRogue is running in the modes access-point or appliance. You have to trust the default self-signed certificate.

Open ports on the isolated network​

By default, the PiRogue blocks most of the network traffic coming from the isolated network except the traffic on the Internet. The PiRogue handles the DCHP and DNS requests from the devices connected to the isolated network. The network traffic from the isolated network to the external network is blocked.

Device connected to PiRogue isolated network interface

However, in some cases, the administrator might want to provide custom services hosted on the PiRogue to the devices connected to the isolated network.

To achieve this, the pirogue-admin-client offers the ability to open and close ports on the isolated network.

The following command list the open ports:

List the open ports on the isolated network
pirogue-admin-client isolated-network list-open-ports

And the result looks like (if any ports are open):

Example of list of the ports that have been opened
pi@pirogue ➜ pirogue-admin-client isolated-network list-open-ports
- port: 8080
- port: 9090

As an example, if you want to open the port 8080 on the isolated network, use the command:

Open a port on the isolated network
pirogue-admin-client isolated-network open-port 8080

The administrator can close all the ports that have been manually opened at once with the command:

Close all ports
pirogue-admin-client isolated-network close-port

It is also possible to close a single port (e.g: 8080):

Close a specific port
pirogue-admin-client isolated-network close-port --incoming-port 8080

Change the Wi-Fi network​

note

Only in the access point operating mode.

The passphrase of the Wi-Fi network is generated at the installation.

Get the Wi-Fi configuration​

To get the current WiFi configuration, use the following command:

Get the configuration of the WiFi access-point
pirogue-admin-client wifi get-configuration

The output looks like:

Example of WiFi access-point configuration
pi@pirogue ➜ pirogue-admin-client wifi get-configuration
country_code: FR
passphrase: superlongkey
ssid: PiRogue

Use this information to connect a device to the PiRogue access-point.

Change the SSID and the passphrase​

The following command allows you to change the WiFi SSID and password:

Configure the WiFi access-point
pirogue-admin-client wifi set-configuration --ssid 'Investigation_Lab' --passphrase 'Hard to guess passphrase !'

Use the following command to list the parameters that can be configured:

List of supported configuration parameters
pirogue-admin-client wifi set-configuration --help

Manage the VPN peers​

note

Only in the VPN operating mode.

Add, list and delete peers​

Add a new Wireguard peer:

Add a Wireguard peer
pirogue-admin-client vpn add-peer

The result will look like:

Example of a peer definition
pi@pirogue ➜ pirogue-admin-client vpn add-peer
idx: 3
private_key: YGe5EF//sIj6QF/2sglmx20b7jxgxFpV1sl8hXBDy34=
public_key: 8lSksu3/HF8vCGi5lCOktI3C9L68PsfNhzDwyuAtMQ0=

To get the list of the currently configured peers, use the command:

List the Wireguard peers
pirogue-admin-client vpn list-peers

The result will look like:

Example of list of Wireguard peers
pi@pirogue ➜ pirogue-admin-client vpn list-peers
- idx: 2
private_key: oA3PBMH5yhBCIykx1odFPbnH+QKq18FBPmdPU1MrmEQ=
public_key: hdlwEsh7SQ0lEPC5Qpl66y9slJkhH4wUYEpzvkEq6V4=
- idx: 3
private_key: YGe5EF//sIj6QF/2sglmx20b7jxgxFpV1sl8hXBDy34=
public_key: 8lSksu3/HF8vCGi5lCOktI3C9L68PsfNhzDwyuAtMQ0=

To delete a peer, you have to specify its index (idx):

Delete the peer #2
pirogue-admin-client vpn delete-peer 2

Connect peers to the VPN​

To connect a peer to the Wireguard VPN, you first need to get its configuration. The peer configuration is returned by the command:

Get the configuration of the peer #3
pirogue-admin-client vpn get-peer-config 3

The result looks like:

Example of peer configuration
pi@pirogue ➜ pirogue-admin-client vpn get-peer-config 3
[Interface]
Address = 10.8.0.3/24
PrivateKey = YGe5EF//sIj6QF/2sglmx20b7jxgxFpV1sl8hXBDy34=
DNS = 10.8.0.1

[Peer]
EndPoint = 185.199.111.153:51820
PublicKey = YxtvfgfpgCpkQKTI9vcVz0LnXGHIwF83Z65OBWw4F0A=
AllowedIPs = 0.0.0.0/0
PersistentKeepAlive = 20

You need to save the configuration of the peer in a .conf file to be loaded on the device. To do so, use the command:

Save the configuration of the peer #3 in the file my-peer-3.conf
pirogue-admin-client vpn get-peer-config 3 > my-peer-3.conf

Alternatively, you can generate a QR-code to be scanned with the Wireguard mobile app:

Get the configuration of the peer #3 QR-code
pirogue-admin-client vpn get-peer-config 3 | qrencode -t ansiutf8

Make the PiRogue accessible from the Internet​

By default, the dashboard and the remote administration of the PiRogue are not exposed on the Internet. This section exposes them, with a certificate from Let's Encrypt.

Requirements

To make the PiRogue accessible from the Internet, you must have:

  • a managed domain name
  • a valid email address to register against certification authorities such as Let's Encrypt

Let's assume the following:

  • you own a domain name: my-domain.org
  • you have a valid administrative email address: contact@my-domain.org
  • the IP address on the Internet of your PiRogue is 185.199.111.153
  • the domain pirogue-lab.my-domain.org resolves the IP address of your PiRogue: pirogue-lab.my-domain.org. 3600 IN A 185.199.111.153
  • if 185.199.111.153 is firewalled, reaching port 80 and 443 from Internet fully translates to your PiRogue respective ports

To Make the PiRogue accessible from the Internet, you have to run the following command on your PiRogue:

Make the PiRogue accessible from the Internet
pirogue-admin-client external-network enable-public-access --domain pirogue-lab.my-domain.org --email contact@my-domain.org

Once successfully done, the dashboard of your PiRogue is accessible on https://pirogue-lab.my-domain.org/dashboard.

Administer the PiRogue remotely​

Warning

Network knowledge is required to configure the remote administration system.

Depending on the network topology in which the administrator wants to perform remote administration, the configuration of the PiRogue and the administrator's computer is different.

There are two main topologies possible:

  • Local Area Network (LAN): usually at home or in organization internal network, connections will be routed within the private network.
  • Wide Area Network (WAN): when the PiRogue is exposed on the Internet

Administrator's computer setup​

Regardless of the administration network topology, you must install pirogue-admin-client on the administrator's computer. It can be done by adding our PPA and installing the required packages. The commands below are for Debian 13: on Debian 12, replace debian-13 with debian-12 in the URLs.

Install the administration client on the administrator's computer
# Install PiRogue PPA
sudo wget -O /etc/apt/sources.list.d/pirogue.list https://pts-project.org/debian-13/pirogue.list
sudo wget -O /etc/apt/trusted.gpg.d/pirogue.gpg https://pts-project.org/debian-13/pirogue.gpg
sudo apt update
# Install pirogue-admin-client
sudo apt install pirogue-admin-client
# If we want to generate QR-codes
sudo apt install qrencode

Administration over the Internet​

First of all, make sure to open your PiRogue to the Internet, see the instructions above.

To connect to the PiRogue remotely, the administration client uses an authentication token. To get this token, use the command:

Get the administration authentication token
pirogue-admin-client access get-administration-token

The following command will reset the authentication token:

Reset the administration authentication token
pirogue-admin-client access reset-administration-token

On the administrator's computer, run the following command to configure the administration client:

Configure the administration client on the administrator's computer
pirogue-admin-client --save --host 'pirogue-lab.my-domain.org' --port 50051 --token <administration token>

And finally, test the communication between the administration client and the PiRogue with:

Example of remote administration from the administrator's computer
pirogue-admin-client system get-configuration