Skip to content

OpenFortiVPN wrapper with automatic OTP retrieval from IMAP address

License

Notifications You must be signed in to change notification settings

chickenzord/empatpuluh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

empatpuluh

OpenFortiVPN wrapper with automatic OTP retrieval from IMAP address.

Why?

Just scratching my own itch.

I use multiple FortiVPN profiles at work which send OTP via corporate email instead of shared key. Automating the copy-paste process can ease the context switching.

Named it empatpuluh (means Forty in Bahasa Indonesia), a number that comes first in mind when thinking about FortiVPN.

Getting started

Sample config ($HOME/.empatpuluh.yml). You can use YAML anchor to reduce repetitive configs.

profiles:
- name: production
  vpn_config: /home/johndoe/vpn/production.cfg
  otp_prompt: "Two-factor authentication token:"
  search_delay: 2s
  search_sender: vpn@company.com
  search_mailbox: OTP
  search_within: 60s
  search_field: subject
  search_regex: 'AuthCode: (\d+)'
  imap:
    host: imap.gmail.com
    port: 993
    username: johndoe@company.com
    password: abcdefgghijklmnopqrstuvwxyz

Then you can connect by running sudo empatpuluh connect production.

About

OpenFortiVPN wrapper with automatic OTP retrieval from IMAP address

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages