This guide outlines the steps to install OpenWRT on the TP-Link ER605 v2 router. OpenWRT provides a customizable, open-source router firmware that offers improved functionality and flexibility.
Before starting, ensure you have the following:
- TP-Link ER605 v2 Router: This guide is specifically for the v2 model.
- OpenWRT Firmware: Download the appropriate firmware for the TP-Link ER605 v2 from the official OpenWRT website by searching 'ER605'.
- Backup of your current router configuration (optional but recommended).
- Hardware:
- USB-to-serial adapter (if you need to use serial recovery mode).
- Ethernet Cable: For a wired connection between your router and PC.
-
Log into the ER605 Web Interface: Open a browser and navigate to
http://192.168.0.1
. -
Navigate to Remote Assistance:
- Go to System Tools > Diagnostics > Remote Assistance.
- Enable Remote Assistance.
-
Generate SSH Root Password:
- Generate your SSH password by clicking the provided link for password generation.
-
SSH into ER605:
-
Open a terminal and connect to the router via SSH:
ssh -o hostkeyalgorithms=ssh-rsa -l root <ip_address>
-
If SSH client 'no matching host key or key exchange method' use:
ssh -o hostkeyalgorithms=ssh-rsa -o KexAlgorithms=+diffie-hellman-group1-sha1 -l root <ip_address>
-
If using version 2.0.1 or below, login using the username
root
and the generated password. -
For version 2.1.1 and above, log in using your web configuration credentials and run the following commands:
enable debug
When prompted for a password, use the "CLI debug mode password" generated earlier.
-
-
Backup MTD Partitions (Recommended):
-
Backup your MTD partitions. For more details, follow this guide: OpenWRT Backup Guide.
-
Use
backup_mtd.sh
and copy the backups to an external flash drive or TFTP.
-
-
Download the Necessary Files:
- SSH into the router and execute the following commands to download the required files:
cd /tmp curl -o er605v2_write_initramfs.sh https://raw.githubusercontent.com/safesploitOrg/openwrt-install-er605v2/main/er605v2_write_initramfs.sh curl -o openwrt-23.05.5-ramips-mt7621-tplink_er605-v2-initramfs-kernel.bin https://downloads.openwrt.org/releases/23.05.5/targets/ramips/mt7621/openwrt-23.05.5-ramips-mt7621-tplink_er605-v2-initramfs-kernel.bin chmod +x er605v2_write_initramfs.sh
- SSH into the router and execute the following commands to download the required files:
-
Run the Installation Script:
- Execute the following command to flash the initramfs image to your ER605:
./er605v2_write_initramfs.sh openwrt-initramfs-compact.bin
- Execute the following command to flash the initramfs image to your ER605:
-
Reboot the ER605:
- After the flashing process completes, reboot the ER605 router.
-
Access the Web Interface:
- Open a web browser and go to
http://192.168.1.1/
. If the page does not load, wait a bit longer or clear your browser cache. Ensure there are no other routers or DHCP servers on the same network to avoid IP conflicts.
- Open a web browser and go to
-
Follow the Setup Instructions:
- After successfully accessing the web interface, follow the on-screen instructions to complete the setup.
-
Upgrade to Latest OpenWRT Version:
- Download the latest sysupgrade image from OpenWRT Downloads.
- Use the web interface to upload and upgrade to the latest stable release.
Once the upgrade is complete, your ER605 should be running OpenWRT. Enjoy the enhanced features and flexibility!
-
Configure OpenWRT:
- Set up your Wi-Fi networks, firewall, and routing preferences.
- Change your root password for security.
-
Harden SSH For enhanced security, disable password authentication for SSH and configure SSH keys.
-
Disable Password Authentication: Edit the
/etc/config/dropbear
file and setPasswordAuth
tooff
. -
Restart the Dropbear service:
/etc/init.d/dropbear restart
-
-
Restore Backup (if applicable):
- If you made a backup of your MTD partitions, you can restore them at this point.
- Router not booting: If the router fails to boot into OpenWRT, you may need to perform a serial recovery using a USB-to-serial adapter and the proper recovery commands.
- Can't access web interface: Try disconnecting all unnecessary devices from the router to avoid IP conflicts.
- Firmware Mismatch: Ensure that the firmware file is correct for the ER605v2 version you have.
- This guide is based on community contributions and research from various OpenWRT forums.
- Special thanks to chill1Penguin for the original setup and guidance on flashing the TP-Link ER605v2 with OpenWRT.