Dich

Dich

不专业的专业博客人,记录知识与感想

OpenWrt Router Deployment

Introduction: openwrt is a free and highly compatible embedded Linux distribution. As an essential tool for software router players, it can achieve various functions such as ad blocking, multi-dialing, and circumventing censorship. This article uses the installation of openwrt on the X86 platform as an example to introduce its deployment process.

openwrt-800x547

Why X86?
Whether as a main router or a side router, traditional routers are not suitable for use as software routers due to their low frequency and small memory. NAS-software router integrated devices also have the risk of all-in-one boom. Therefore, it is recommended to use the X86 platform as a physical machine. Of course, you can also use the armbian platform or development boards such as the NetXin Cloud Old Mother Hen and Raspberry Pi. As of the time of writing this article, the prices on the second-hand market are not very favorable: the price of a J1900 platform is often around 200, and dedicated multi-port industrial control machines range from 200 to 1000. Raspberry Pi has become a financial product, so it needs to be chosen carefully.

Preparation

  1. Compilation package of openwrt, three classic versions compiled by eSir:
    https://drive.google.com/drive/folders/1uRXg_krKHPrQneI3F2GNcSVRoCgkqESr
  2. PE boot disk, here I recommend WeiPE: https://www.wepe.com.cn/download.html
  3. Image writing tool: https://www.roadkil.net/program.php?ProgramID=12#google_vignette
  4. A USB flash drive and a dual-port physical machine
    Installation process:
    1. Enter the PE environment:
  5. Open WeiPE, install it into the USB flash drive, and put the ing tool and openwrt package into it after installation.

Screenshot 2023-08-08 104541

  1. Insert the USB flash drive into the target host, enter the BIOS-boot to set the USB flash drive as the priority boot device. Different motherboards have different keys to enter the BIOS, so it is recommended to try them all if unsure.

v2-96d77f192e1cf8d2e23d6bd82f4ac17c_r

2. Format the hard drive and write the image

  1. Enter the PE environment, you can see a software called "Partition Assistant", open it and format the target host's hard drive; be careful not to partition! Do not partition! Do not set the file system! Otherwise, compilation may not be possible in the future!

v2-085c97756f3808237ed1e55748eace9d_1440w

Click the submit and execute button in the upper left corner

v2-9589ca7b786481a08d546fb1256f74d9_1440w

  1. Open the image writing tool and write the openwrt package to the hard drive, be careful not to write it to the USB flash drive.

v2-d43aa34f17616c80e59c4cbd1cfcccc3_1440w

3. Enter the configuration interface

  1. Restart the system and quickly remove the USB flash drive to avoid re-entering the PE environment; the system will start running at this time.
    Note that Esir firmware does not run codes, so there is no need to worry.

v2-76cffb21019a215c89545c1da5418c42_1440w

  1. When you see the prompt "please press Enter to activate this console", the system installation is complete. You can use the "passwd" command to set a password. The software router will automatically obtain an IP address, and then we can open the address in a browser to see the Lucl interface.

c3fd280f8a2a4c9489aa2bbc22e1323c

Postscript: The open-source world also has systems such as DD-WERT and Tomato. Just as the development of the Internet is not smooth sailing, OpenWRT has also experienced setbacks, such as core developers leaving and launching LEDE and other twists and turns. After the merger of LEDE and OpenWRT in 2018, through the unremitting efforts of many developers, OpenWRT now has a rich and complete ecosystem.
Official Wiki: https://openwrt.org/zh/start

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.