如何借助LinOTP为Apache2保驾护航?(1)


本文介绍了使用一次性密码为Apache 2设置双因子验证的方法。我们假设,你已经设置好了自己的LinOTP服务器。你可以下载Debian和Ubuntu程序包,也可以使用Python软件包仓库(Python Package Index)来安装系统。它提供了一个便捷的方法,可以创建用于演示的服务,并让服务运行起来(检查确保是最新版本)。

下载

一次性密码(OTP)验证使用Apache验证提供程序来完成,用于Apache基本验证。该提供程序可以从github网站下载(https://github.com/lsexperts/mod_authn_linotp)。

或者你可以直接在命令行下载该软件包:

wget https://github.com/lsexperts/mod_authn_linotp/zipball/master -O mod_authn_linotp.zip

安装

你在Ubuntu或Debian系统上至少需要下列软件包,来编译Apache模块:

dpkg -i libtool automake autoconf build-essential libcurl4-gnutls-dev

现在,对该模块解压缩,进入目录:

unzip mod_authn_linotp.zip

cd lsexperts-mod_authn_linotp-3583b90

安装过程在文件INSTALL中也加以描述:

libtoolize

aclocal

automake --add-missing

autoconf

./configure

make

sudo make install

你还可以使用checkinstall,创建一个Debian软件包,以便更容易处理软件包。

sudo checkinstall make install

现在,该模块位于/usr/lib/apache2/modules/mod_authn_linotp.so。

激活模块

sudo a2enmod authn_linotp


相关内容