2
1
Folks, I wanna find a generic way to run a (simple bash) script on boot sequence of a router with embedded Linux. I have read about ways to do this on devices like:
- DD-WRT
- OpenWRT
- any NAS like D-Link DNS-323
But I was wondering if it could be done too on generic embedded devices, like a (mostly simple) DSL router. Possible reasons for doing this:
- Generic method of updating public IP of the device to DNS servers that allow it (I found some that allow it via simple http commands).
- Send any data to FTP server, like public IP of the device.
- Simple way to tell «The device is ON» to a remote host, like executing "telnet MySSHServer 22" to a SSH home server.
- Add network rules, ARP list, disable any network interface (ethx)... etc.
- Learning & Investigation ;-)
I have heard of some people doing this with some DSL router by keeping these steps:
- Save all router (including configuration) data to a firmware-like file.
- Edit that firmware file (i.e: modifying "/etc/rc.local" file).
- Restoring the modified firmware file to the router.
Is there a better way that anyone knows of?
Thanks for answering. Saddly, I don't know of any open firmware that works for DSL routers. But those are good ideas. And I could automate your TFTP trick with iMacros ot AutoHotkey. :-) – Sopalajo de Arrierez – 2014-01-22T00:14:27.327
By a "DSL router", I assume you mean a combined DSL modem/router with multi-port switch and/or wireless AP function. None of the open router projects will support that hardware, but... you don't HAVE to use the router function built into the DSL modem/router. You can simply use it as a DSL modem and set the router function to simply pass-thru, and then use an additional piece of hardware that can be hacked for the router/AP/Switch function. You'll be much happier with this approach if you are considering advanced configuration like this, over attempting to hack the combo hardware. – Codex24 – 2014-01-23T18:08:28.720