目的

FreeRADIUS2を利用した認証サーバをたてる。
OSにはCentOS6.3を利用。本稿記述時点でのバージョンは2.1.12

[root@radius]# radiusd -v
radiusd: FreeRADIUS Version 2.1.12, for host x86_64-redhat-linux-gnu, built on Oct  3 2012 at 01:22:51
Copyright (C) 1999-2011 The FreeRADIUS server project and contributors.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License.
For more information about these matters, see the file named COPYRIGHT.
[root@radius]#

RADIUSの基本

Remote Authentication Dial In User Service
認証とアカウンティングの仕組みのこと。日米wikiでは「プロトコル」という記載があるが、 ネット上の情報ではサーバであったり仕組みであったり、あいまいだなぁ。

導入方法

#インストールはこれだけ!

[root@radius]# yum install freeradius

radius基本設定

設定ファイルは /etc/raddb/ に展開される。

共通設定

個別設定

動作確認

freeradiusはデーモンとして動作もできるが、一旦デバッグモードで立ち上げて動作確認をしておく
テスト環境では、FreeRADIUSは 192.168.10.193 というIPアドレスで稼動している。

[root@radius]# radiusd -X
~省略~
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on command file /var/run/radiusd/radiusd.sock
Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
Listening on proxy address * port 1814
Ready to process requests.

別ターミナルを立ち上げて、もしくは前述の clients.confで指定した端末から動作確認を行う。

その他の設定項目

vertual_serverの利用

認証する機器(オーセンティケータ)ごとに認証方式を変更することができる。
下記例では、192.168.1.1というオーセンティケータに対して、TARGET_DEVICEという名称を付け、専用の設定としている。

クライアントの設定

[root@radius]# vi /etc/raddb/clients.conf
client DEVICE {
       ipaddr = 192.168.1.1
       netmask = 32
       secret = RADIUS_SECRET
       virtual_server = TARGET_DEVICE
}

バーチャルサーバ設定

[root@radius]# vi /etc/raddb/site-available/TARGET_DEVICE
server TARGET_DEVICE {
  authorize {
    unix
  }

  authenticate {
    unix
  }

  post-auth {
          exec
          Post-Auth-Type REJECT {
                  attr_filter.access_reject
          }
  }
}

バーチャルサーバの有効化

[root@radius]# ln -s /etc/raddb/site-available/TARGET_DEVICE /etc/raddb/site-enabled




Counter: 21482, today: 1, yesterday: 0

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS