📡 OpenWrt - Installing and Configuring ...

📡 OpenWrt - Installing and Configuring OpenWrt on Raspberry Pi 5

Apr 26, 2025

image

Introduction

OpenWrt is a powerful and lightweight Linux distribution designed for embedded devices. By installing it on a Raspberry Pi 5, you can transform your device into a high-performance router, firewall, VPN server, or a custom network gateway.

This guide walks you through a complete OpenWrt installation and basic configuration.


🛠 Requirements

  • Raspberry Pi 5 (preferably with 4 GB or 8 GB RAM)

  • microSD Card (minimum 8 GB, Class 10 recommended)

  • USB Ethernet adapter (optional, for dual Ethernet setup)

  • Power adapter

  • Ethernet cable

  • A computer (Windows, macOS, or Linux)


📥 Step 1: Download OpenWrt Image

  1. Visit the OpenWrt Official Downloads Page.

  2. Navigate to:

Example:

openwrt-23.05.3-bcm27xx-bcm2712-rpi-5-ext4-factory.img.gz


💾 Step 2: Prepare the SD Card

  1. Insert the SD card into your computer.

  2. Use balenaEtcher or Raspberry Pi Imager to flash the downloaded .img.gz file onto the SD card.

  3. Once flashing is complete, safely eject the SD card.


⚡ Step 3: Boot OpenWrt on Raspberry Pi 5

  1. Insert the SD card into your Raspberry Pi 5.

  2. Connect the Pi to your router or computer using an Ethernet cable.

  3. Power on the Raspberry Pi and wait for it to boot.

By default, OpenWrt will assign itself the IP address 192.168.1.1 and start a DHCP server.


🔌 Step 4: First Connection

If your computer is directly connected to the Raspberry Pi:

  1. Set your computer’s Ethernet adapter to obtain an IP address automatically (via DHCP).

  2. Open a browser and navigate to http://192.168.1.1.

  3. You should see the OpenWrt web interface, LuCI.

⚠️ Important: There is no root password set initially. You must set one immediately!


🛡 Step 5: Set the Root Password

  1. In LuCI, go to System > Administration.

  2. Create and save a new root password.

Note: Without setting a password, SSH access is disabled by default for security.


🌐 Step 6: Configure Internet (WAN) Connection

If you plan to use your Pi as a router:

  1. Navigate to Network > Interfaces.

  2. Edit the WAN interface:

  3. Edit the LAN interface:

  4. Save the changes and reboot the device.


🌟 Step 7: Essential OpenWrt Settings

1. Set Timezone and Date

  • Go to System > System and adjust the timezone settings.

2. Update Software Packages

  • In System > Software, refresh the package lists.

  • Install useful packages such as:

3. Enable SSH Access

  • You can enable SSH access for advanced configurations.


⚙️ Step 8: Dual Ethernet Setup (Optional)

If you added a USB Ethernet adapter:

  1. Go to Network > Interfaces and create a new interface.

  2. Assign the USB Ethernet port as WAN and the onboard Ethernet port as LAN.

Result:

  • eth0 → WAN (Internet)

  • eth1 → LAN (Local network)

This setup is ideal for a proper router deployment!


🛡️ Step 9: Firewall and Security

  1. Go to Firewall > Traffic Rules to configure custom access rules.

  2. You can restrict or allow management access based on IP addresses.


🚀 Bonus: Install AdGuard Home on OpenWrt (Optional)

You can install AdGuard Home (or Pi-hole) directly on OpenWrt to block ads and trackers across your entire network.


🎯 Conclusion

By following these steps, you’ve successfully turned your Raspberry Pi 5 into a fully functional OpenWrt router!

From here, you can set up a VPN server, implement QoS settings, enhance your firewall, or even run network-wide ad blocking.

Подобається цей допис?

Купити для Mustafa Sönmez каву

Більше від Mustafa Sönmez

КонфіденційністьУмовиПоскаржитись