Deutsche Telekom?
If you use a different internet provider that allows you to replace the ONT, you just need to find a compatible GPON SFP and figure out the 1. Fiber Optic Modem config. If you don’t have fiber or don’t want to replace your internet provider ONT, you can always use the 1Gbit Ethernet WAN port or the 10Gbit SFP WAN port to connect your ISP modem to the Banana PI R4. If you don’t need an SFP port or 10Gbit WAN/LAN, take a look at the Banana Pi R64.
OpenWrt snapshot
You need to use a snapshot build for Banana Pi R4. At the time of writing, the latest changes to support this router have not yet landed in any stable release and are only available in main.
Local environment
I’m using a MacBook Pro. There’s very little to do when using your local environment, like decompressing images or flashing an SD card. Those shell commands can be easily translated to Linux or Windows. You can also use balenaEtcher. To keep things simple and make use of OpenWrt default configuration as much as possible and if you can, change your current internet router or hotspot to use a private network other than 192.168.1.0/24 or 192.168.2.0/24. Snippets that should be executed in this environment are tagged with user@local:~#.
OpenWrt build environment
I use Ubuntu 24.04 LTS for the OpenWrt toolchain and image builder, but you have other options. Instead of mangling with my local environment, I use a e2-highcpu-32 GCP instance with 32 cores. It costs $1 per hour. Do yourself a favor and use a cloud provider instance with 32 cores or more to significantly reduce OpenWrt build times. Snippets that should be executed in this environment are tagged with [email protected]:~#.
Ethernet adapter
If you do most of your work on a laptop without an ethernet adapter, you should get one. It’ll make your life easier when connecting and troubleshooting the router. The Banana Pi R4 is a router and has no HDMI adapter. You can also use the USB to TTL UART converter.
SSH key for your router
Generate a new SSH key for increased security when connecting to your router. Using an SSH key will allow you to disable password authentication and root logins with password. Snippets that should be executed in OpenWrt are tagged with root@openwrt:~#.
Bash
Copy
ssh-keygen -t ed25519 -C "root@openwrt" -f ~/.ssh/id_ed25519_openwrt
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/nickname/.ssh/id_ed25519_openwrt
Your public key has been saved in /Users/nickname/.ssh/id_ed25519_openwrt.pub
The key fingerprint is:
SHA256:8J3iqChnQ+n9lkFS3qMunF2Eh4TXNShGJTF+TfwS13 root@openwrt
The key's randomart image is:
+--[ED25519 256]--+
| oo*+o |
| .+ o + |
| o . +. o o + |
| = o ++o o. = |
| . . B S. .+ o |
|. = O. . o |
|.. o = .o. . |
| .+ o ..o E |
| oo. ..o |
+----[SHA256]-----+
Generate a new SSH key
SSH config
You can add an openwrt host to your SSH config so you can easily type ssh openwrt when connecting to the router.
Plain Text
Copy
Host openwrt
Hostname 192.168.1.1
User root
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
IdentityFile ~/.ssh/id_ed25519_openwrt
~/.ssh/config