Remote-access Guide

openwrt remote access

by Dessie Tromp IV Published 3 years ago Updated 2 years ago
image

Step 1: I Assume, That You Have OpenWrt Already...

I had to install OpenWrt first... Mostly, I followed this guide (specific for this router model): https://dzone.com/articles/hacking-into-xiaomi-mi-... While working on this, I found this awesome video: Openwrt installation, WiFi benchmark, Girlfriend Flashing. Wow I laughed so hard! :)

Step 2: Software and Tools

On the smartphone side, I'm using Blynk. It provides iOS and Android apps to control any hardware. You can easily build beautiful graphic interfaces for all your projects by simply dragging and dropping widgets, right on your smartphone. Blynk is mostly used with Arduino, Raspberry Pi, etc. But why not running it on the router itself? ;)

Step 4: Adding Some Info: Number of Clients, WAN IP Address, Uptime

The basic idea is to get the info from the OS periodically, perform some simple computations if needed, and then send the result to Blynk for display.

Step 7: HDD Spinning Status

My router has an external HDD drive connected as a Network Attached Storage device. The thing is, this drive is configured to start spinning when someone accesses it, and to suspend after a timeout.

Step 8: Network Activity Chart

We Create another SuperChart widget (similar to previous one), Add TX and RX datastreams, and assign to V1 and V2. Note: I want to display WAN port statc, and my WAN port is eth0.2

Step 9: Notifications

I also wanted to be notified when my Router looses power or internet connection. For this, we need Notification widget.

Step 10: Autorun in Background

For now the script has to be manually executed, but I want to make it run in background automatically when router is powered up.

Status page

Once you've logged in, you'll see the main status page. From here you can get a high-level view of your routers status. We'll go through some of the information viewable on this page.

Set up root password

Before we actually do anything else, we need to set the root password. As we mentioned, root is the username of the administrative user in OpenWrt. Since this is an extremely powerful account, we need to provide a strong password that you'll remember.

image
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9