포티넷 IPsec VPN 2FA 무료 구축 매뉴얼
장비 : FortiGate FGT-201F v7.2.10
인증 : IKEv2 + EAP-TTLS/PAP + FreeRADIUS TOTP(Append Mode)
클라이언트 : FortiClient 7.4.3
FortiOS 7.6.X 부터 SSL VPN 삭제 예정으로 IPsec VPN을 구축해보았습니다.
1. FreeRADIUS 서버 구축
OS : Rocky 8.10
패키지 설치
dnf install -y freeradius freeradius-utils
dnf install -y python38 python38-pip
pip 3.8 install pyotp==2.9.0
dnf install -y wpa_supplicant
디렉토리 구조 및 권한
mkdir -p /etc/raddb/totp_secrets
mkdir -p /etc/raddb/users_passwd
mkdir -p /etc/raddb/scripts
chown -R radiusd:radiusd /etc/raddb/totp_secrets
chown -R radiusd:radiusd /etc/raddb/users_passwd
chown -R radiusd:radiusd /etc/raddb/scripts
chmod 750 /etc/raddb/totp_secrets
chomd 750 /etc/raddb/users_passwd
chmod 750/etc/raddb/scripts
TOTP 인증 스크립트 작성
TLS 인증서 생성
totp_check exec 모듈 생성
EAP 모듈 설정 (* mschapv2 블록 삭제)
inner-tunnel 가상 서버 생성 (*totp_check는 여기서만 호출)
sites-enabled/default outer 터널 설정 (EAP처리만 담당)
/etc/raddb/clients.conf 설정
SELinux 정책 설정
AVC 로그 수집 및 정책 모듈 생성
grep "totp_auth" /var/log/audit/audit.log | audit2allow -M radiusd_totp
semodule -i radiusd_totp.pp
semodule -B
1단계 FreeRADIUS 기동 및 EAP-TTLS 검증
2단계 FortiGate IPsec VPN 설정 (IKEv2 + EAP + Split Tunnel + DPD)
3단계 FortiClient 7.4.3 XML 파싱