I have this issue when Sky renews my public facing IP roughly every 56 days and if I am not around the Flint2 router will fail to re-negotiate a new IP and stay in the 100.x.x.x range.
I have come across a potential work-around but I've not tested it yet and wanted to post it here for someone at GL-iNET to confirm this is the best work-around for me?
Automatically Renew via a Cron Watchdog Script
To prevent this issue from happening when you aren't around, you can create a lightweight watchdog script on the Flint 2 that tests for internet connectivity and auto-renews the WAN connection if the connection drops after an IP change.
-
SSH into your Flint 2.
-
Create a script file in an appropriate persistent directory:
bash
vi /etc/config/wan_watchdog.shUse code with caution.
-
Paste the following automated script (press
ito enter insert mode invi):bash
#!/bin/sh # Ping a stable public DNS server to test connectivity if ! ping -c 2 -W 3 8.8.8.8 > /dev/null 2>&1; then logger "WAN Watchdog: Internet disconnected (possible IP change). Forcing WAN renew..." ifup wan fiUse code with caution.
-
Save and exit (press
ESC, then type:wqand hitEnter). -
Make the script executable:
bash
chmod +x /etc/config/wan_watchdog.shUse code with caution.
-
Add it to the system router scheduler (Cron) so it runs every 2 to 5 minutes:
bash
echo "*/2 * * * * /etc/config/wan_watchdog.sh" >> /etc/crontabs/rootUse code with caution.
-
Enable and restart the cron daemon to register the task: [1]
bash
/etc/init.d/cron enable /etc/init.d/cron restart
Thanks