Looking for a script that would calculate up time/down time from the last time it was up and if it's been 48hrs past the current date time to disable ports.
Also, how to determine current time to last link time up/down to convert then compare to which one is greater.
Not a programmer here just a network admin that's trying to learn.
Scenario: Router goes out gets plugged into network, script fires off to open vpn tunnel to router and ports are disabled, tech calls network admin to looking to open those disabled ports then have a script that will run every 10 minutes comparing link up-time and down time to determine if it's been past 48hrs to disable the ports. Trying to eliminate lost or stolen, misplaced routers that are out in the field that could be a security risk.