I have dedicated Ubuntu server in the Internet so I want to:
- Connect to my server via HTTP(s)
- Input password and MFA token (i.e. Google Authenticator token)
- If both are correct, server executes iptables rule that temporary opens some ports to IP i've authenticated from
What is the best/easiest way to implement that?
Why not libpam-google-authenticator + ssh:
- I do not want to expose ssh port by default. I use key-based auth but nevertheless.
- I want to run automation scripts from my machine w/o entering MFA token every time
- I want to work from Windows using Cygwin ssh