In today’s highly interconnected digital age, network devices have become an indispensable part of our daily lives and work. To meet the personalized needs of different users regarding network functions, the open-source community has produced many excellent projects, among which OpenWrt is one.
OpenWrt is a Linux operating system that focuses on providing customized and open-source solutions for embedded devices. It brings unlimited possibilities, allowing users to easily customize their network devices by adding extra packages or applications to meet specific needs. Whether for home routers, enterprise-level routers, or other embedded devices, OpenWrt can provide powerful functions and flexible customization capabilities. Next, we will focus on the installation and application of OpenWrt on the x86 platform, starting a personalized customized network experience. Let’s explore OpenWrt together and master the fun and practicality of customizing network devices.
Preparation
physdiskwrite
OpenWRT Stable Version Image (Current Stable Version: 23.05.2
)
Decide which image to download based on your device. If it supports UEFI, download the file with EFI; otherwise, download the other version. Additionally, according to the official introduction, the squashfs version can use the reset function, so if you like to tinker, it is recommended to choose the squashfs format version. Address: https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/
The following will take
openwrt-23.05.2-x86-64-generic-squashfs-combined.img
as an example.
WinPE (USB Magic Tool v5)
PE is also essential. You can choose any, as all the necessary tools are recommended; you can use any PE you like, what you need are the two software mentioned above. The USB Magic Tool v5 used here is available at: https://www.sysceo.com/software-softwarei-id-121.html#links
Flashing Installation
-
1. Enter PE system
-
2. Use physdiskwrite to write the IMG file to the hard disk
physdiskwrite.exe -u openwrt-23.05.2-x86-64-generic-squashfs-combined.img
-
3. Use DiskGenius to adjust partition size
Before adjustment:
After adjustment:
4. Restart to enter OpenWRT
Do not restart immediately after writing the disk; adjust the partition before restarting. This way, the partition size will be automatically adjusted during the first startup.
Initial Settings
-
1. Change root password
-
2. Enable WAN port access to WEB management page and SSH access
uci add firewall rule
uci set firewall.@rule[-1].name='Allow-Admin'
uci set firewall.@rule[-1].enabled='true'
uci set firewall.@rule[-1].src='wan'
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].dest_port='22 80 443'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall
service firewall restart
WEB Login (WAN Port)
SSH Login (WAN Port)
WEB Interface Localization
The official version only includes English; there is no Chinese. If your English is not good, you need to install Chinese.
-
1. Upgrade the plugin library list
-
2. Search for luci-i18n-base-zh-cn and install it.
3. Change the default language to Chinese