FreeRADIUS は、RADIUS、DHCPv4、DHCPv6、TACACS+、および VMPS をサポートする、高性能で高度に構成可能なマルチプロトコル ポリシー サーバーです。これは、GNU GPLv2 の条件に基づいて提供されます。RADIUS を使用すると、認証と認可をネットワーク上で一元化できるため、新しいユーザーがネットワークに追加または削除されるときの必要性が最小限に抑えられます。
CHAP: チャレンジ ハンドシェイク認証プロトコル、チャレンジ ハンドシェイク認証プロトコル。
組み立て手順
1. 環境要件
OS:CentOS7マシン
FreeRADIUS:FreeRADIUSバージョン3.0.13
2. インストール構成と環境設定
1.簡単な環境設定については、「FreeRadius サーバーの環境設定(PAP 版)」
を参照してください。 2. /etc/raddb/sites-enabled/default を変更してチャレンジを有効にします。freeradius ソース コードにはチャレンジ設定の例があり、パスは /etc/raddb/sites-available/challenge です。
server default {
listen {
type = auth
ipaddr = *
port = 0
virtual_server = challenge
}
#server challenge {
authorize {
#
# If ther's no State attribute, then this is the request from
# the user.
#
if (!State) {
update control {
Auth-Type := Step1
Cleartext-Password := "password"
}
}
else {
#
# Do authentication for step 2.
# Set the "known good" password to the number
# saved in the session-state list.
#
update control {
Auth-Type := Step2
Cleartext-Password := &session-state:Tmp-Integer-0
}
}
}
authenticate {
Auth-Type Step1 {
# If the password doesn't match, the user is rejected
# immediately.
pap
#
# Set the random number to save.
#
update session-state {
Tmp-Integer-0 := "%{randstr:n}"
}
update reply {
Reply-Message := &session-state:Tmp-Integer-0
}
#
# Send an Access-Challenge.
# See raddb/policy.d/control for the definition
# of "challenge"
#
challenge
}
Auth-Type Step2 {
#
# Do PAP authentication with the password.
#
pap
}
}
post-auth {
-sql
exec
remove_reply_message_if_eap
Post-Auth-Type REJECT {
-sql
attr_filter.access_reject
eap
remove_reply_message_if_eap
}
Post-Auth-Type Challenge {
remove_reply_message_if_eap
attr_filter.access_challenge.post-auth
}
}
}
3. テスト
チャレンジテストにはワカモレを使用します。
具体的な参照先: Guacamole の Radius 認証方式を有効にする設定 guacamole の Radius 認証方式を有効にするように設定します。