Is there some way that you can muck about with iptables in a “temporary” way such that if you screw up(*) and do something stupid like lock yourself out of the router, you can fix it by just doing a reboot instead of a full-on factory reset?
Most major network operating systems have something like this (Cisco IOS XR calls it “commit confirm” - that’s the one I’m most familiar with…)
Even if there was some way to do this with a script, it would still be really useful. Something like a shell command that says:
“Hey, you, router! Launch this process here in the background, and if I don’t come back within the next [some amount of time] and kill you, I want you to replace whatever I’ve done with the iptables rules with this file, which is a known-good-enough config”.
I have to think that if routerOS is really just a linux OS that this would not be terribly difficult, but I don’t know enough about iptables or where/how routerOS stores this state to be able to make much progress on this myself…. But it does seem like it would be useful.
* note- everyone screws up.