Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

3 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages