What is this? Long story short.
If your WAN
interface using WWAN/QMI/NCM/3G protocol
with your modem is working but your connection drops from time to time, you have just found the safe heaven. These scripts make sure your router is online, managing your interface or router itself. You would probably find use of it when you need to have working internet in locations with difficult access, e.g. cabin in the woods, garage or your house on Seychelles.
How it works?
All the scripts run on ash which is the basic shell for OpenWRT.
The main script (internet-keep-alive.sh
) tries to ping Google DNS servers (8.8.8.8) using Netcat.
- If it fails, it restarts the interface.
- If it fails 4 times in a row, it restarts whole system.
Online/offline results are being logged intolog.txt
, which has a cap of11000
lines, not to flood the whole space on the device.
Requirements
Netcat package The TCP/IP Network R/W Utility. The installer installs this package.
Installation
- Log into the router via SSH and go to the directory where you want to keep the script files.
- Make sure the router is online, then run the installer using this command and follow the instructions:
wget -q --no-check-certificate https://raw.githubusercontent.com/francescocam/openwrt-lte-keep-alive/refs/heads/master/install.sh -O install.sh && chmod +x install.sh && ./install.sh
Simple, right?
Enjoy ❤️🏠📡📶!