人気ブログランキング | 話題のタグを見る

Metaphorical Dream

FreeRADIUS設定

Condition:お誕生日おめでとう!の連絡、有り難いです。

単刀直入に以下となります。

####################################################################

#/etc/raddb/radiusd.conf

デフォルトのまま。
特に変更箇所なし。

EAP関連設定は【radiusd.conf】内の
$INCLUDE ${confdir}/eap.conf
により、
/etc/raddb/eap.conf
という別ファイルを参照する形式となっているため。

####################################################################

#/etc/raddb/eap.conf

以下を設定変更

#default_eap_type = md5
#
#defaultではMD5なためTLSに変更。

default_eap_type = tls



### EAP-TLS
#
# To generate ctest certificates, run the script
#
#../scripts/certs.sh
#
# The documents on http://www.freeradius.org/doc
# are old, but may be helpful.
#
# See also:
#
# http://www.dslreports.com/forum/remark,9286052~mode=flat
#
⇒1  tls {
⇒2  private_key_password = whatever
⇒3  private_key_file = ${raddbdir}/certs/cert-srv.pem

# If Private key & Certificate are located in
# the same file, then private_key_file &
# certificate_file must contain the same file
# name.
⇒4  certificate_file = ${raddbdir}/certs/cert-srv.pem

# Trusted Root CA list
⇒5  CA_file = ${raddbdir}/certs/demoCA/cacert.pem

⇒6  dh_file = ${raddbdir}/certs/dh
⇒7  random_file = ${raddbdir}/certs/random

#
# This can never exceed the size of a RADIUS
# packet (4096 bytes), and is preferably half
# that, to accomodate other attributes in
# RADIUS packet. On most APs the MAX packet
# length is configured between 1500 - 1600
# In these cases, fragment size should be
# 1024 or less.
#
#fragment_size = 1024

# include_length is a flag which is
# by default set to yes If set to
# yes, Total Length of the message is
# included in EVERY packet we send.
# If set to no, Total Length of the
# message is included ONLY in the
# First packet of a fragment series.
#
#include_length = yes

# Check the Certificate Revocation List
#
# 1) Copy CA certificates and CRLs to same directory.
# 2) Execute 'c_rehash '.
# 'c_rehash' is OpenSSL's command.
# 3) Add 'CA_path='
# to radiusd.conf's tls section.
# 4) uncomment the line below.
# 5) Restart radiusd
#check_crl = yes

#
# If check_cert_cn is set, the value will
# be xlat'ed and checked against the CN
# in the client certificate. If the values
# do not match, the certificate verification
# will fail rejecting the user.
#
#check_cert_cn = %{User-Name}
⇒8  }

####################################################################
⇒1
ここのコメントを外さないと始まりません。

⇒2
"#Create Srv"にて、サーバ証明書発行時に入力したKeyパスワードです。

⇒3
サーバ証明書のパスです。

⇒4
サーバ証明書にKeyファイルを含んでいるのであれば、"⇒3"と同じパスです。

⇒5
CAのroot証明書のパスです。

⇒6
コメントアウトを解除しただけにしました。
defaultでサンプルの"dh"ファイルが存在するため。
実際は"dh2048.pem"or"dh1024.pem"のパスを指定すればいいかなと。

⇒7
コメントアウトを解除しただけにしました。
別途ランダムファイルを作成したのであれば、そのパスを指定。
ランダムファイルの作成コマンドがすぐに出てこなかったため。

⇒8
ここのコメントアウトを解除し忘れることがあるので要注意。
####################################################################

#/etc/raddb/clients.conf

#以下のように記載
#APやWLCなどAuthenticaterを登録する。
#ようするに、RADIUS鯖へのアクセス可否をここで登録できる。
#ここに登録がなければ、STA(=Client)の証明書が正式なものであっても、
#APやWLCがRADIUS鯖へアクセスできないため認証自体が行われない。
#
#書式にはいくつかのパターンがあり、個別、NW、ホスト名で指定できる。
#ただし、個別とNWは排他利用となっている。らしい。。。
#「じゃあ、ホスト名はどうなの?」という問いについては・・・わからんです(笑)
#実際に試してくださいませ。
#
#
#個別の場合

client 192.168.1.100 {
  secret= testAP1
  shortname= testAP

#NWの場合

client 192.168.1.0/24 {
  secret= testAPs1
  shortname= testAPs

#ホスト名の場合

client hoge.fuga.jp {
  secret= test.hoge
  shortname= testAP_HostName

#"secret"はAuthenticater側と同一のパスワード
#"shortname"は、descriptionだと思ってください。
#
#個別を使うか?NWを使うか?については、設計・運用・セキュリティ指針など、
#それぞれでの落としどころを見つけてください。
#運用指針的にはNW指定の方が良いけど、セキュリティ的には個別指定の方がいいなど。
#
####################################################################

#/etc/raddb/users
#
#Local認証する際には以下のように記載
#(主にテスト目的で)
#

"test"Auth-Type := Local, User-Password == "test"

#EAPにて認証させる場合には以下のように記載
#
#

"clt1@hoge.jp"Auth-Type := EAP

"usr1@hoge.jp"Auth-Type := EAP

#証明書のCNに記載した文字列を" "内に記載する。
#上記の例で言えば、clt1@hoge.jpやusr1@hoge.jpのこと。
#
#Auth-Typeは、EAPにする。
#チャレンジャーでなければ、コロンやスペースはいじらない方が無難です。
#
#ユーザDBは「LDAPやADのDBを参照させたいんだけど。」っていうのは、
#至極当然ですが、そこまで検証できておりません。
#オレも必要に迫られたら、頑張れるかも。。。

by mdesign21 | 2007-04-18 09:39 | IT系