Mikrotik 2 Factor authentication

Or you can just be kidnapped and forced to log in and nothing helps (maybe suicide capsule with poison in tooth?) :slight_smile:

I’d give him the emergency PIN, which if entered still allows decoding and access, but also call the police without notification… :laughing: :laughing: :laughing: :laughing:

I think now OP has quite enough solutions how to implement 2fa or dynamic credentials...

I missed this one... true, it can be done like that, by using some value(s) unique to router, since it is for my home router and only I have access to it I did not bother, but good idea.

Edit: ROS feature request comes to my mind: Secure Storage - something like Mac Keychain password storage, can be some key-value storage unlocked with logged in user or running script user. Not exportable if not show-sensitive.

I mean this does sound like TOTP 2FA, which is pretty standard these days (quoting from bottom of the link):

So curious at what you’re looking for?

.

If we were talking about hardware 2FA token devices (e.g. RSA SecureID), it was a check that physical held something. Since semi-temper resitance and cannot backup/copy them, so if lost/missing you really are screwed – that adds a quite a bit of a layer from 2FA. When your just switch to another app like Google Authenticator (or Authy or whatever TOTP-enabled app) on the same device that may have your password saved in the keychain/browser… I’m not sure that add the same level of security…so not all 2FA isn’t the same. Does user-manager add something with TOTP… sure. How much, harder to quantify.

For various factor combination term is MFA if multiple factors are involved, 2FA is part of MFA scope

@Amm0
Excuse me, but I was sincerely asking about another practical use, except the above, not about the technology to use,
because I can’t think of anything else…

@optio
please do not quote all or go out one mess :question:

I’m old, but your right MFA is the modern term. But I’m surprise they even have 2 on Mikrotik.

Also, I suppose if one drank the Cloudflare cool-aid, you could run the various ports through their app firewall. Cloudflare lets you apply various ā€œMFAā€ in front of it. But I’m waiting for the ATP to try that approach :wink:.

If you ignore the "dumb admin" case, sure complete unneeded. But not everyone is smart. :wink:

I have seen something like this, not with Mikrotik, but same use case I'd imagine. AcmeCorp buys router from MT-Consultant. They don't want the MT-Consultant to be able to login remotely without AcmeCorp's authorization – e.g. it is their router, but have install/support contract. Consultant enables the RADIUS login when provisioning the router, AcmeCorp is given the TOTP key and has Google Authenticator once the router is deployed in production. If remote access is later required, the AcmeCorp needs to provide MT-Consultant the TOTP key from an app to allow access. AcmeCorp does not have know a thing about RouterOS. MT-Consultant knows the password but they need the 6 digit code from the AcmeCorp for maintenance. Could MT-Consultant put a backdoor in, sure...but AcmeCorp may also perform security audit using a different consultant that may catch that.

I've used PPP secret to store apikeys. Not great but works to avoid them being in an export without show-sensitive. See:

But totally agree better support for persisting secure (and "insecure") data from scripting be useful.

What dumb request is this? Tell me how, how tf do you 2FA on Juniper or Cisco?

https://foisfabio.it/index.php/2024/04/19/mikrotik-otp-vpn/