How to install and use oathtool (oath-toolkit) with pfsense OpenVPN client



  • Updated 2018-10: oathtool is a CLI tool that can be used to generate almost any kind of OTP tickets and is used for automating logins when the server asks for a OTP (usually as PIN+token as the password).

    I was able to successfully use it with OpenVPN on multiple platforms RHEL, Ubuntu, Tomato, MacOS (Viscosity) by using connection hooks (preconnect scripts). More details on my previous article on https://medium.com/@sbarnea/automating-openvpn-login-with-otp-82b58123e0c8

    Now I am trying to do the same with pfsense and first surprise was that was not able to find it as part of the default available pkgs.

    For the moment I found a way to install oath tool on pfsense-2.4.4:

    # does anyone knows an alternative that does not break when new versions are released?
    pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libgpg-error-1.32.txz http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/nspr-4.20.txz http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/nss-3.39.txz  http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/xmlsec1-1.2.25.txz http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libgcrypt-1.8.3.txz http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libxslt-1.1.32.txz http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/xmlsec1-1.2.25.txz http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/oath-toolkit-2.6.2.txz 
    rehash
    

    What should be done to make this a more permanent solution?


Log in to reply