Yes, it's true! OpenBSD runs on the Raspberry Pi 4B, and pretty nicely, at that.
The advantage of this is that OpenBSD, as a firewall, including the spamd functionality, uses about 10-20% CPU on an old 1997 Sun UltraSPARC 5 "Pizza Box". That means OpenBSD as a firewall is not that CPU-intensive. This is good.
This means the Raspberry Pi 4B, which is an order of magnitude more powerful than the UltraSPARC 5, and has 8GB DRAM and four ARM cores, will be just cruisin' along, all the while sippin' tiny little bits of electricity. This is really good.
The key is to get a USB-to-TTL-Serial converter, using a CP2102 chip (what I use) or similar. You use three pins on the 40-pin GPIO interface. The pinout is as follows.
GND wire -> Pin 6 (GND)
RXD wire -> Pin 8 (TXD)
TXD wire -> Pin 10 (RXD)
That's all you have to hook up. The default TTL serial speed is 115,200 bps, so you'd configure your comm program that way.
NOTE: it was pins 8 and 10 that I had trouble figuring out. I thought that the RXD wire would go to the RXD pin on the Pi. Nope. The RXD wire goes to the TXD pin on the Pi, and similar for pin 10 (TXD wire to the Pi's RXD pin).
Then, to get access to the serial port, you can fire up your comm program. Remember to engage 115,200 bps, 8 bits, no parity, 1 stop bit (115200, 8N1).
I use the "screen" command on my GNU/Linux desktops (Slackware and Debian, at present), like below. We're assuming that your USB-to-serial adaptor's device name is /dev/ttyUSB0, the standard name if you have one plugged in to your box.
cowboyt@slackbox$ screen /dev/ttyUSB0 115200
If you're not sure what it showed up as, you can do "ls -l /dev/ttyUSB*", and that should get you what it's called. Also, be sure you're in the right group for access to your comm port; you may need to put your user ID in, for example, the "modem" group, depending on your GNU/Linux distibution.
If you're on Microsoft Windows, it should show up under Device Manager.
Either way, that's how you get access to it--serially.
Then, you download the latest OpenBSD image, preferably the arm64 version. I use the Raspberry Pi Imager program to do this; it's nice and GUI, so it's easy to use. Point it to the arm64 image that you downloaded and let 'er rip.
Then, proceed with the OpenBSD installation as you normally would. Note that I hooked up an external USB 3.0 SSD drive and installed OpenBSD to there. You'd configure the Pi to boot from USB just like you would if you were running Raspbian (a.k.a. Raspberry Pi OS). It's pretty straight forward.
And now, I have a fully functional anti-spam, stateful packet-filtering firewall that sips just a little bit of power.
Gotta love it.
The advantage of this is that OpenBSD, as a firewall, including the spamd functionality, uses about 10-20% CPU on an old 1997 Sun UltraSPARC 5 "Pizza Box". That means OpenBSD as a firewall is not that CPU-intensive. This is good.
This means the Raspberry Pi 4B, which is an order of magnitude more powerful than the UltraSPARC 5, and has 8GB DRAM and four ARM cores, will be just cruisin' along, all the while sippin' tiny little bits of electricity. This is really good.
The key is to get a USB-to-TTL-Serial converter, using a CP2102 chip (what I use) or similar. You use three pins on the 40-pin GPIO interface. The pinout is as follows.
GND wire -> Pin 6 (GND)
RXD wire -> Pin 8 (TXD)
TXD wire -> Pin 10 (RXD)
That's all you have to hook up. The default TTL serial speed is 115,200 bps, so you'd configure your comm program that way.
NOTE: it was pins 8 and 10 that I had trouble figuring out. I thought that the RXD wire would go to the RXD pin on the Pi. Nope. The RXD wire goes to the TXD pin on the Pi, and similar for pin 10 (TXD wire to the Pi's RXD pin).
Then, to get access to the serial port, you can fire up your comm program. Remember to engage 115,200 bps, 8 bits, no parity, 1 stop bit (115200, 8N1).
I use the "screen" command on my GNU/Linux desktops (Slackware and Debian, at present), like below. We're assuming that your USB-to-serial adaptor's device name is /dev/ttyUSB0, the standard name if you have one plugged in to your box.
cowboyt@slackbox$ screen /dev/ttyUSB0 115200
If you're not sure what it showed up as, you can do "ls -l /dev/ttyUSB*", and that should get you what it's called. Also, be sure you're in the right group for access to your comm port; you may need to put your user ID in, for example, the "modem" group, depending on your GNU/Linux distibution.
If you're on Microsoft Windows, it should show up under Device Manager.
Either way, that's how you get access to it--serially.
Then, you download the latest OpenBSD image, preferably the arm64 version. I use the Raspberry Pi Imager program to do this; it's nice and GUI, so it's easy to use. Point it to the arm64 image that you downloaded and let 'er rip.
Then, proceed with the OpenBSD installation as you normally would. Note that I hooked up an external USB 3.0 SSD drive and installed OpenBSD to there. You'd configure the Pi to boot from USB just like you would if you were running Raspbian (a.k.a. Raspberry Pi OS). It's pretty straight forward.
And now, I have a fully functional anti-spam, stateful packet-filtering firewall that sips just a little bit of power.
Gotta love it.

Comment