Skip to content

Instantly share code, notes, and snippets.

@martin-juul
Last active July 29, 2021 23:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martin-juul/f3ed78d9914964a321a7eecb2b75c154 to your computer and use it in GitHub Desktop.
Save martin-juul/f3ed78d9914964a321a7eecb2b75c154 to your computer and use it in GitHub Desktop.

Installing ipFire on a Raspberry Pi 3 b+

Sharp language ahead, but i was infuriated at getting openWRT to work before this. Go away if you're easily offended.

Step 1: Download ipFire

I have mirrored the version I've been using for this guide. Though i encourage you to download the latest one.

Mirror: https://drive.google.com/open?id=1u--Ynws2FTW4X1oycYXp2xOZ4B8pvRt6 Download links: https://www.ipfire.org/download/ipfire-2.23-core136 ipFire Wiki: https://wiki.ipfire.org/hardware/arm/rpi

Step 2

Flash image to SD Card (balenaEtcher, Rufus, etc) Mount the visible partition on the sdcard, enter and edit uENV.txt Change SERIAL-CONSOLE=ON to SERIAL-CONSOLE=OFF Yes, i got stuck pulling my hair out here. Who the fuck uses serial on a raspberry pi!? Add enabled_uart=0 to config.txt

DO NOT PLUGIN ANDROID PHONE YET!

If you’re using macOS

For some fucking reason macOS thinks it’s entitled to put .fseventsd, .Spotlight-V100 directories, and then it even has the fucking audacity to add ._filename.ext to every fucking unix executable.

To fix this idiocy, then follow these steps - or your device won’t boot 9 times out of 10. Say the partition is mounted at /Volumes/Untitled

You would run:

cd /Volumes
rm -rf ./Untitled/.fseventsd ./Untitled/Spotlight*
dot_clean /Volumes/Untitled

Then you can exit your terminal (or navigate away, otherwise diskutility will say the resource is busy), and then unmount the volume in Disk Utility.

Before you ask. I fucking loathe Windows and Linux on the desktop. I’d rather get fired than forced into using those steaming piles of bullshit.

References

uEnv.txt

KVER=4.14.138
DTBSUNXI=sun8i-h3-nanopi-r1.dtb
root_dev=UUID=f205e905-d590-4834-a8bd-e7cd82cb1727
SERIAL-CONSOLE=OFF

Step 3 - Boot time

ipFire says boot could be up to like 90 seconds. If it's anything more, you're dealing with driver issues. Unplug each and every usb devie until you have boot.

IPFire Wiki

 DONATE

  1. Hardware
  2. ARM
  3. Raspberry Pi
  4. Raspberry Pi 3 Model B+

Raspberry Pi 3 Model B+

This board is supported since IPFire 2.21.

Raspberry Pi 3B+ specifications

  • SoC: Broadcom BCM2837B0 1
  • CPU: Quad-core A53 (ARMv8) 64-bit @ 1.4GHz
  • GPU: Broadcom Videocore-IV
  • RAM: 1GB LPDDR2 SDRAM
  • Network: Gigabit Ethernet (via USB channel), 2.4GHz & 5GHz 802.11b/g/n/ac Wi-Fi
  • Bluetooth: Bluetooth 4.2, Bluetooth Low Energy (BLE)
  • Storage: Micro-SD
  • GPIO: 40-pin GPIO header, populated
  • Ports: HDMI, 3.5mm analogue audio-video jack, 4x USB 2.0, Ethernet
  • Dimensions: 82mm x 56mm x 19.5mm, 50g

USB-to-LAN adapters are listed here.

Download at least IPFire 2.21 (Flash Image) and flash it to an MicroSD card.


Note!
The ARM flash image is configured for serial console at default. If using the serial console edit the config.txt file and add enable_uart=1 to the end.
If using HDMI output and USB Keyboard edit the uENV.txt file and change SERIAL-CONSOLE=ON to OFF.


After flashing the SD card install it into the Raspberry Pi, connect the cables and power supply, and power it up. At the start of booting you'll see:

Net: No ethernet found. starting USB... USB0: Core Release: 2.80a scanning bus 0 for devices...

The Raspberry Pi 3 Model B+ (Raspi 3B+) will normally boot within 70 seconds. Once the Raspi 3B+ is fully booted begin to follow the steps here.


Note!
If the IPFire sits for more than 3 to 4 minutes it may be trying to locate a driver for an unknown USB device. Unplug the unknown device and reboot the Raspberry Pi.


Note!
In the IPFire setup Extended Network Menu the on-board Ethernet port is known as usb: Standard Microsystems Corp. SMSC95. And the wireless/WiFi is known as sdio: brcmfmac.


Benchmarks

Network

To perform these benchmarks, the Raspberry Pi IPFire box was connected... iperf3. gigabit ethernet.

computer [client] <--> Raspberry Pi IPFire <--> computer [server]

iMac3:~ $ iperf3 -c 192.168.60.1 Connecting to host 192.168.60.1, port 5201 [ 5] local 192.168.1.100 port 51353 connected to 192.168.60.1 port 5201 . . . [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 91.2 MBytes 76.5 Mbits/sec sender [ 5] 0.00-10.00 sec 90.8 MBytes 76.1 Mbits/sec receiver

iMac3:~ $ iperf3 -c 192.168.60.1 -R Connecting to host 192.168.60.1, port 5201 Reverse mode, remote host 192.168.60.1 is sending [ 5] local 192.168.1.100 port 51359 connected to 192.168.60.1 port 5201 . . . [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 86.0 MBytes 72.2 Mbits/sec 252 sender [ 5] 0.00-10.00 sec 85.6 MBytes 71.8 Mbits/sec receiver

OpenSSL Speed Test

/usr/bin/openssl speed -elapsed -evp [cipher] 2

Cipher 16k bytes kB/s Mbit/s
aes-256-gcm 4,336 34.7
aes-192-gcm 4,653 37.2
aes-128-gcm 4,997 40.0
camellia-256-cbc 13,238 105.9
camellia-192-cbc 13,206 105.6
camellia-128-cbc 17,012 136.1
aes-256-cbc 8,660 69.3
aes-192-cbc 9,967 79.7
aes-128-cbc 11,693 93.5
seed-cbc 11,895 95.2

OpenVPN Speed Test

time /usr/sbin/openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --ncp-disable --cipher [cipher]

Cipher real Mbit/s
aes-256-gcm 2m44.956s 19.4
aes-192-gcm 2m38.765s 20.2
aes-128-gcm 2m32.902s 20.9
camellia-256-cbc 1m53.125s 28.3
camellia-192-cbc 1m53.125s 28.3
camellia-128-cbc 1m46.372s 30.1
aes-256-cbc 2m9.788s 24.7
aes-192-cbc 2m3.320s 25.9
aes-128-cbc 1m57.558s 27.2
seed-cbc 1m55.202s 27.8

Links


  1. from MagPi magazine Raspberry Pi 3B+ Specs And Benchmarks 

  2. Tested on IPFire 2.21 (armv5tel) - Core Update 126 

 EDIT PAGE ‐ YES, YOU CAN EDIT!

Older Revisions - August 2 at 9:46 pm - Jon

© 2019 - IPFire - The Open Source FirewallLogin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment