FreeRADIUSとCisco機器を利用した802.1X認証
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
#contents
* 目的 [#w608a904]
FreeRADIUS2を利用した802.1X認証を実施する。~
オーセンティケータにはCisco機器(ルータ・L2SW)を利用する~
サプリカントはWindowsXP付属のものを利用する~
RADIUSサーバはCentOS6.3上で稼動。本稿記述時点でのバージョ...
[root@radius]# radiusd -v
radiusd: FreeRADIUS Version 2.1.12, for host x86_64-redh...
Copyright (C) 1999-2011 The FreeRADIUS server project an...
There is NO warranty; not even for MERCHANTABILITY or FI...
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the term...
GNU General Public License.
For more information about these matters, see the file n...
[root@radius]#
* RADIUSについて [#xedc63e5]
[[FreeRADIUSによる認証サーバ]][[OpenSSLによるPKI構築]]を...
* 802.1X認証 [#l939e7ad]
以下の認証方式による接続テストを実施する。
-EAP-MD5
-EAP-PEAP(内部認証:MS-CHAP-V2)
-EAP-TLS
-MACアドレス認証(802.1X認証ではない)
利用するCisco機器は以下
-Cisco1812J(IOS:15.1(4)M1)
-Catalyst2940-8TT(IOS:12.1(22)EA8a)
-Catalyst2960-24T(IOS:12.2(58)SE2)
* 設定 [#k6788d36]
** Cisco設定 [#o619f4c6]
*** 全般設定 [#h5b4420d]
802.1X認証とログイン認証を別サーバで実施する場合は、radiu...
-radiusグループを作成する場合
!aaaの採用
aaa new-model
aaa session-id common
!radiusサーバグループの作成と802.1X認証を実施
aaa group server radius ForDot1X
server-private 192.168.10.251 auth-port 1812 acct-port ...
aaa authentication dot1x default group ForDot1X
dot1x system-auth-control
!radiusアトリビュートによるダイナミックVLANを実施する場...
aaa authorization network default group ForDot1X if-auth...
-radiusグループを作成しない場合
!aaaの採用
aaa new-model
aaa session-id common
!radiusサーバの設定と802.1X認証を実施
radius-server host 192.168.10.251 auth-port 1812 acct-po...
aaa authentication dot1x default group radius
dot1x system-auth-control
!radiusアトリビュートによるダイナミックVLANを実施する場...
aaa authorization network default group radius if-authen...
*** Cisco1812J [#zb7fd26e]
MACアドレスバイパスは非対応
vlan database
vlan 10 name soumu_seg
vlan 20 name keiri_seg
exit
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
ip route 0.0.0.0 0.0.0.0 192.168.10.254
!
interface fas 2
description ## AuthPort : eap ##
switchport mode access
no ip address
dot1x port-control auto
spanning-tree portfast
interface fas 9
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
*** Catalyst2940 [#t3bf835c]
MACアドレスバイパスは非対応
vlan 10
name soumu_seg
vlan 20
name keiri_seg
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
!
interface FastEthernet0/1
description ## AuthPort : eap ##
switchport mode access
dot1x port-control auto
spanning-tree portfast
interface GigabitEthernet0/1
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
*** Catalyst2950 [#e6f33d2e]
vlan 10
name soumu_seg
vlan 20
name keiri_seg
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
!
interface fas 0/1
description ## AuthPort : eap ###
switchport mode access
dot1x pae authenticator
dot1x port-control auto
dot1x violation-mode protect
dot1x timeout tx-period 3
spanning-tree portfast
interface fas 0/2
description ## AuthPort : mac address bypass ##
switchport mode access
dot1x mac-auth-bypass
dot1x pae authenticator
dot1x port-control auto
dot1x violation-mode protect
dot1x timeout tx-period 3
spanning-tree portfast
interface GigabitEthernet0/48
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
*** Catalyst2960 [#aa0a36d1]
vlan 10
name soumu_seg
vlan 20
name keiri_seg
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
!
interface FastEthernet0/1
description ## AuthPort : eap ###
switchport mode access
authentication order dot1x
authentication priority dot1x
authentication port-control auto
dot1x pae authenticator
spanning-tree portfast
!
interface FastEthernet0/2
description ## AuthPort : mac address bypass ##
switchport mode access
authentication order mab
authentication priority mab
authentication port-control auto
mab
dot1x pae authenticator
spanning-tree portfast
interface GigabitEthernet0/1
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
**radiusサーバの設定 [#dd1e8bce]
***FreeRadius設定ファイルの修正 [#u889c8f2]
-DHファイルの準備~
openssl dhparam -5 -out /etc/raddb/radiuscerts/dh 1024
-認証方式の指定~
利用する認証方式にEAPを追加する。
[centos@radius]# vi /etc/raddb/sites-available
authorize {
files
unix
eap {
ok = return
}
}
authenticate {
files
unix
eap
}
post-auth {
exec
Post-Auth-Type REJECT {
attr_filter.access_reject
}
}
-EAP全般設定~
/etc/raddb/eap.confに設定するが、デフォルトのままで問題な...
eapセクション中の default_eap_type が md5となっていても、...
[centos@radius]# vi /etc/raddb/eap.conf
eap {
default_eap_type = tls
timer_expire = 60
ignore_unknown_eap_types = no
cisco_accounting_username_bug = no
max_sessions = 4096
tls {
bcrtdir = radiuscerts
certdir = ${confdir}/${bcrtdir}
cadir = ${confdir}/${bcrtdir}
private_key_password = RadiusSV
private_key_file = ${certdir}/RadiusSV_key.pem
certificate_file = ${certdir}/RadiusSV_crt.pem
CA_file = ${cadir}/chainCA_crt.pem
dh_file = ${certdir}/dh
#random_file = ${certdir}/random
random_file = /dev/urandom
CA_path = ${cadir}
cipher_list = "DEFAULT"
ecdh_curve = "prime256v1"
cache {
enable = no
lifetime = 24 # hours
max_entries = 255
}
verify{
}
}
}
-ユーザリスト
# vi users
$INCLUDE /etc/raddb/userlist/users.eap
$INCLUDE /etc/raddb/userlist/users.login
$INCLUDE /etc/raddb/userlist/users.mab01
$INCLUDE /etc/raddb/userlist/users.mab02
# vi userlist/users.eap
eapuser Auth-Type == EAP , Cleartext-Password := "eappass"
# vi userlist/users.mab01
DEFAULT Auth-Type == PAP
Tunnel-Type := 13 , Tunnel-Medium-Type := 6 , Tu...
Fall-Through = Yes
1877ecd5f394 Cleartext-Password := "1877ecd5f394" , NAS-...
2877ecd5f394 Cleartext-Password := "2877ecd5f394" , NAS-...
# vi userlist/users.mab02
DEFAULT Auth-Type == PAP
Tunnel-Type := 13 , Tunnel-Medium-Type := 6 , Tu...
Fall-Through = Yes
055dc061bf92 Cleartext-Password := "055dc061bf92" , NAS-...
255dc061bf92 Cleartext-Password := "255dc061bf92" , NAS-...
# chown -R root.radiusd userlist
*** EAP-MD5 [#c879af16]
ユーザ定義ファイルにユーザ名とパスワードを記載する。~
Auth-TypeがSystemになっていれば、LinuxUID/PWDが利用できる...
[centos@radius]# vi /etc/raddb/users
------------8<-----------------
eapuser Auth-Type:=EAP , Cleartext-Password := "eapp...
------------8<-----------------
*** EAP-TLS [#n526cb69]
[[OpenSSLによるPKI構築]]を参照し、認証局を作成しておくこ...
デフォルトのFreeRADIUSで作成されている証明書情報などを利...
有効期限切れのため、独自RADIUSサーバとしてサーバ証明書を...
-サーバ証明書を作成(RootCAから作成)~
cd ~/ca
mkdir RadiusSV
cd ~/ca/RadiusSV
mkdir private
openssl req -config ../configs/openssl_req.cnf -new -new...
openssl rsa -in private/RadiusSV_key.pem -out private/Ra...
cd ~/ca/RootCA
openssl ca -config ../configs/openssl_sign.cnf -keyfile...
cd ~/ca/RadiusSV
openssl x509 -in RadiusSV_crt.pem -out RadiusSV_crt.pem
-クライアント証明書(秘密鍵パスワード、エクスポート用パス...
cd ~/ca
mkdir ClientDV01
cd ~/ca/ClientDV01
mkdir private
openssl req -config ../configs/openssl_req.cnf -new -new...
openssl rsa -in private/ClientDV01_key.pem -out private/...
cd ~/ca/InterCA
openssl ca -config ../configs/openssl_sign.cnf -keyfile...
cd ~/ca/ClientDV01
openssl pkcs12 -export -inkey private/ClientDV01_key.pem...
→ここでパスワードは空欄エンターとする
-クライアント証明書(秘密鍵パスワード、エクスポート用パス...
cd ~/ca
mkdir ClientDV02
cd ~/ca/ClientDV02
mkdir private
openssl req -config ../configs/openssl_req.cnf -new -new...
cd ~/ca/InterCA
openssl ca -config ../configs/openssl_sign.cnf -keyfile...
cd ~/ca/ClientDV02
openssl pkcs12 -export -inkey private/ClientDV02_key.pem...
**クライアントの設定 [#z4284eeb]
WindowsOSは標準でEAP-MD5(WinXPのみ搭載),EAP-PEAP,EAP-TLS...
通常はローカルエリア接続のプロパティに「認証タブ」が表示...
+スタートメニューからコントロールパネルを起動
+管理ツールからサービスを選択
+Wired AutoConfigを右クリックして、開始を選択
+Wired AutoConfigを右クリックして、プロパティを選択し、「...
*** EAP-MD5 [#daaa3319]
MD5は証明書を利用せず、パスワードのハッシュ値を用いた利用...
-WindowsXPの設定~
ローカルエリア接続のプロパティから認証タブを選択し、802.1...
-Windows7の設定~
Windows7にはEAP-MD5がプルダウンボックスになかった。だめな...
*** EAP-PEAP(MS-CAHP-V2) [#c1c0f31c]
PEAPはサーバ証明書を利用し、UID/PWDによる利用者認証を実施...
-WindowsXPの設定~
ローカルエリア接続のプロパティから認証タブを選択し、802.1...
設定をクリックし、サーバ証明書を検証するにチェックを入れ...
下部の認証方法を選択するでEAP-MSCHAPV2を選択し、構成のボ...
これがチェックされたままだと、Windowsログインのユーザ名と...
*** EAP-TLS [#jfcc1e68]
PEAPはサーバとクライアントの双方で証明書を利用し、相互認...
-WindowsXPの設定~
ローカルエリア接続のプロパティから認証タブを選択し、802.1...
スマートカードまたはその他の証明書を選択する。~
設定をクリックし、サーバ証明書を検証するにチェックを入れ...
~
~
~
#counter
終了行:
#contents
* 目的 [#w608a904]
FreeRADIUS2を利用した802.1X認証を実施する。~
オーセンティケータにはCisco機器(ルータ・L2SW)を利用する~
サプリカントはWindowsXP付属のものを利用する~
RADIUSサーバはCentOS6.3上で稼動。本稿記述時点でのバージョ...
[root@radius]# radiusd -v
radiusd: FreeRADIUS Version 2.1.12, for host x86_64-redh...
Copyright (C) 1999-2011 The FreeRADIUS server project an...
There is NO warranty; not even for MERCHANTABILITY or FI...
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the term...
GNU General Public License.
For more information about these matters, see the file n...
[root@radius]#
* RADIUSについて [#xedc63e5]
[[FreeRADIUSによる認証サーバ]][[OpenSSLによるPKI構築]]を...
* 802.1X認証 [#l939e7ad]
以下の認証方式による接続テストを実施する。
-EAP-MD5
-EAP-PEAP(内部認証:MS-CHAP-V2)
-EAP-TLS
-MACアドレス認証(802.1X認証ではない)
利用するCisco機器は以下
-Cisco1812J(IOS:15.1(4)M1)
-Catalyst2940-8TT(IOS:12.1(22)EA8a)
-Catalyst2960-24T(IOS:12.2(58)SE2)
* 設定 [#k6788d36]
** Cisco設定 [#o619f4c6]
*** 全般設定 [#h5b4420d]
802.1X認証とログイン認証を別サーバで実施する場合は、radiu...
-radiusグループを作成する場合
!aaaの採用
aaa new-model
aaa session-id common
!radiusサーバグループの作成と802.1X認証を実施
aaa group server radius ForDot1X
server-private 192.168.10.251 auth-port 1812 acct-port ...
aaa authentication dot1x default group ForDot1X
dot1x system-auth-control
!radiusアトリビュートによるダイナミックVLANを実施する場...
aaa authorization network default group ForDot1X if-auth...
-radiusグループを作成しない場合
!aaaの採用
aaa new-model
aaa session-id common
!radiusサーバの設定と802.1X認証を実施
radius-server host 192.168.10.251 auth-port 1812 acct-po...
aaa authentication dot1x default group radius
dot1x system-auth-control
!radiusアトリビュートによるダイナミックVLANを実施する場...
aaa authorization network default group radius if-authen...
*** Cisco1812J [#zb7fd26e]
MACアドレスバイパスは非対応
vlan database
vlan 10 name soumu_seg
vlan 20 name keiri_seg
exit
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
ip route 0.0.0.0 0.0.0.0 192.168.10.254
!
interface fas 2
description ## AuthPort : eap ##
switchport mode access
no ip address
dot1x port-control auto
spanning-tree portfast
interface fas 9
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
*** Catalyst2940 [#t3bf835c]
MACアドレスバイパスは非対応
vlan 10
name soumu_seg
vlan 20
name keiri_seg
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
!
interface FastEthernet0/1
description ## AuthPort : eap ##
switchport mode access
dot1x port-control auto
spanning-tree portfast
interface GigabitEthernet0/1
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
*** Catalyst2950 [#e6f33d2e]
vlan 10
name soumu_seg
vlan 20
name keiri_seg
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
!
interface fas 0/1
description ## AuthPort : eap ###
switchport mode access
dot1x pae authenticator
dot1x port-control auto
dot1x violation-mode protect
dot1x timeout tx-period 3
spanning-tree portfast
interface fas 0/2
description ## AuthPort : mac address bypass ##
switchport mode access
dot1x mac-auth-bypass
dot1x pae authenticator
dot1x port-control auto
dot1x violation-mode protect
dot1x timeout tx-period 3
spanning-tree portfast
interface GigabitEthernet0/48
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
*** Catalyst2960 [#aa0a36d1]
vlan 10
name soumu_seg
vlan 20
name keiri_seg
!
interface vlan 10
ip address 192.168.10.181 255.255.255.0
ip default-gateway 192.168.10.254
!
interface FastEthernet0/1
description ## AuthPort : eap ###
switchport mode access
authentication order dot1x
authentication priority dot1x
authentication port-control auto
dot1x pae authenticator
spanning-tree portfast
!
interface FastEthernet0/2
description ## AuthPort : mac address bypass ##
switchport mode access
authentication order mab
authentication priority mab
authentication port-control auto
mab
dot1x pae authenticator
spanning-tree portfast
interface GigabitEthernet0/1
description ## UplinkPort ##
switchport access vlan 10
spanning-tree portfast
**radiusサーバの設定 [#dd1e8bce]
***FreeRadius設定ファイルの修正 [#u889c8f2]
-DHファイルの準備~
openssl dhparam -5 -out /etc/raddb/radiuscerts/dh 1024
-認証方式の指定~
利用する認証方式にEAPを追加する。
[centos@radius]# vi /etc/raddb/sites-available
authorize {
files
unix
eap {
ok = return
}
}
authenticate {
files
unix
eap
}
post-auth {
exec
Post-Auth-Type REJECT {
attr_filter.access_reject
}
}
-EAP全般設定~
/etc/raddb/eap.confに設定するが、デフォルトのままで問題な...
eapセクション中の default_eap_type が md5となっていても、...
[centos@radius]# vi /etc/raddb/eap.conf
eap {
default_eap_type = tls
timer_expire = 60
ignore_unknown_eap_types = no
cisco_accounting_username_bug = no
max_sessions = 4096
tls {
bcrtdir = radiuscerts
certdir = ${confdir}/${bcrtdir}
cadir = ${confdir}/${bcrtdir}
private_key_password = RadiusSV
private_key_file = ${certdir}/RadiusSV_key.pem
certificate_file = ${certdir}/RadiusSV_crt.pem
CA_file = ${cadir}/chainCA_crt.pem
dh_file = ${certdir}/dh
#random_file = ${certdir}/random
random_file = /dev/urandom
CA_path = ${cadir}
cipher_list = "DEFAULT"
ecdh_curve = "prime256v1"
cache {
enable = no
lifetime = 24 # hours
max_entries = 255
}
verify{
}
}
}
-ユーザリスト
# vi users
$INCLUDE /etc/raddb/userlist/users.eap
$INCLUDE /etc/raddb/userlist/users.login
$INCLUDE /etc/raddb/userlist/users.mab01
$INCLUDE /etc/raddb/userlist/users.mab02
# vi userlist/users.eap
eapuser Auth-Type == EAP , Cleartext-Password := "eappass"
# vi userlist/users.mab01
DEFAULT Auth-Type == PAP
Tunnel-Type := 13 , Tunnel-Medium-Type := 6 , Tu...
Fall-Through = Yes
1877ecd5f394 Cleartext-Password := "1877ecd5f394" , NAS-...
2877ecd5f394 Cleartext-Password := "2877ecd5f394" , NAS-...
# vi userlist/users.mab02
DEFAULT Auth-Type == PAP
Tunnel-Type := 13 , Tunnel-Medium-Type := 6 , Tu...
Fall-Through = Yes
055dc061bf92 Cleartext-Password := "055dc061bf92" , NAS-...
255dc061bf92 Cleartext-Password := "255dc061bf92" , NAS-...
# chown -R root.radiusd userlist
*** EAP-MD5 [#c879af16]
ユーザ定義ファイルにユーザ名とパスワードを記載する。~
Auth-TypeがSystemになっていれば、LinuxUID/PWDが利用できる...
[centos@radius]# vi /etc/raddb/users
------------8<-----------------
eapuser Auth-Type:=EAP , Cleartext-Password := "eapp...
------------8<-----------------
*** EAP-TLS [#n526cb69]
[[OpenSSLによるPKI構築]]を参照し、認証局を作成しておくこ...
デフォルトのFreeRADIUSで作成されている証明書情報などを利...
有効期限切れのため、独自RADIUSサーバとしてサーバ証明書を...
-サーバ証明書を作成(RootCAから作成)~
cd ~/ca
mkdir RadiusSV
cd ~/ca/RadiusSV
mkdir private
openssl req -config ../configs/openssl_req.cnf -new -new...
openssl rsa -in private/RadiusSV_key.pem -out private/Ra...
cd ~/ca/RootCA
openssl ca -config ../configs/openssl_sign.cnf -keyfile...
cd ~/ca/RadiusSV
openssl x509 -in RadiusSV_crt.pem -out RadiusSV_crt.pem
-クライアント証明書(秘密鍵パスワード、エクスポート用パス...
cd ~/ca
mkdir ClientDV01
cd ~/ca/ClientDV01
mkdir private
openssl req -config ../configs/openssl_req.cnf -new -new...
openssl rsa -in private/ClientDV01_key.pem -out private/...
cd ~/ca/InterCA
openssl ca -config ../configs/openssl_sign.cnf -keyfile...
cd ~/ca/ClientDV01
openssl pkcs12 -export -inkey private/ClientDV01_key.pem...
→ここでパスワードは空欄エンターとする
-クライアント証明書(秘密鍵パスワード、エクスポート用パス...
cd ~/ca
mkdir ClientDV02
cd ~/ca/ClientDV02
mkdir private
openssl req -config ../configs/openssl_req.cnf -new -new...
cd ~/ca/InterCA
openssl ca -config ../configs/openssl_sign.cnf -keyfile...
cd ~/ca/ClientDV02
openssl pkcs12 -export -inkey private/ClientDV02_key.pem...
**クライアントの設定 [#z4284eeb]
WindowsOSは標準でEAP-MD5(WinXPのみ搭載),EAP-PEAP,EAP-TLS...
通常はローカルエリア接続のプロパティに「認証タブ」が表示...
+スタートメニューからコントロールパネルを起動
+管理ツールからサービスを選択
+Wired AutoConfigを右クリックして、開始を選択
+Wired AutoConfigを右クリックして、プロパティを選択し、「...
*** EAP-MD5 [#daaa3319]
MD5は証明書を利用せず、パスワードのハッシュ値を用いた利用...
-WindowsXPの設定~
ローカルエリア接続のプロパティから認証タブを選択し、802.1...
-Windows7の設定~
Windows7にはEAP-MD5がプルダウンボックスになかった。だめな...
*** EAP-PEAP(MS-CAHP-V2) [#c1c0f31c]
PEAPはサーバ証明書を利用し、UID/PWDによる利用者認証を実施...
-WindowsXPの設定~
ローカルエリア接続のプロパティから認証タブを選択し、802.1...
設定をクリックし、サーバ証明書を検証するにチェックを入れ...
下部の認証方法を選択するでEAP-MSCHAPV2を選択し、構成のボ...
これがチェックされたままだと、Windowsログインのユーザ名と...
*** EAP-TLS [#jfcc1e68]
PEAPはサーバとクライアントの双方で証明書を利用し、相互認...
-WindowsXPの設定~
ローカルエリア接続のプロパティから認証タブを選択し、802.1...
スマートカードまたはその他の証明書を選択する。~
設定をクリックし、サーバ証明書を検証するにチェックを入れ...
~
~
~
#counter
ページ名: