Linux从2.6内核开始自带IPsec模块,配合IPsec-Tools,可以实现Linux的IPsec功能。
IPsec-Tools包含4个模块
- libipsec:PF_KEY实现库
- setkey:用于配置SAD(安全关联数据库)和SPD(安全策略数据库)
- racoon:IKE守护程序,用于自动建立IPsec连接
- racoonctl:操作racoon的shell工具
安装步骤
- 下载压缩包ipsec-tools-0.8.0.tar.bz2。
- 解压
tar -jxvf ipsec-tools-0.8.0.tar.bz2
- 进入解压目录,configure
cd ipsec-tools-0.8.0
export CFLAGS="-fno-strict-aliasing"
这一步不执行make阶段会报错。./configure --with-kernel-headers=/lib/modules/2.6.*/build/include
此处必须指定kernel header,系统内核版本必须为2.6 - make
make
- make install
make install
配置文件
- setkey.conf:SAD和SPD配置信息