質問編集履歴
4
コピペミスを訂正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -112,7 +112,7 @@
|
|
112
112
|
/etc/raddb/clients.conf
|
113
113
|
220 #client localhost_ipv6 {
|
114
114
|
221 # ipv6addr = ::1
|
115
|
-
222 # secret =
|
115
|
+
222 # secret = testing1234
|
116
116
|
223 #}
|
117
117
|
268 client network {
|
118
118
|
269 ipv4addr = 192.168.124.0/24
|
3
/var/log/radius/radius.log 実施した作業を記載致しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
###前提・実現したいこと
|
2
2
|
radiusサーバーを構築作業を前任から引き継ぎ作業しております。
|
3
|
+
openldapとradiusサーバーの連携を目指しています。
|
3
4
|
systemctlでサービスが起動できない状態でしたので、最初から作業を行いたいと考え、rpm -qa | grep radius で表示されたパッケージ一覧をremoveコマンドで削除。yum install freeradius.x86_64
|
4
5
|
yum install freeradius-ldap.x86_64
|
5
6
|
yum install freeradius-utils.x86_64
|
@@ -53,7 +54,25 @@
|
|
53
54
|
-- Subject: Unit radiusd.service has failed
|
54
55
|
```
|
55
56
|
```
|
57
|
+
vi /var/log/radius/radius.log
|
58
|
+
Sun Oct 15 08:48:23 2017 : Error: tls: error:2306A075:PKCS12 routines:PKCS12_item_decrypt_d2i:pkcs12 pbe crypt error
|
59
|
+
Sun Oct 15 08:48:23 2017 : Error: tls: error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib
|
60
|
+
Sun Oct 15 08:48:23 2017 : Error: tls: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib
|
61
|
+
Sun Oct 15 08:48:23 2017 : Error: rlm_eap_tls: Failed initializing SSL context
|
62
|
+
Sun Oct 15 08:48:23 2017 : Error: rlm_eap (EAP): Failed to initialise rlm_eap_tls
|
63
|
+
Sun Oct 15 08:48:23 2017 : Error: /etc/raddb/mods-enabled/eap[14]: Instantiation failed for module "eap"
|
64
|
+
Sun Oct 15 08:50:58 2017 : Info: Debugger not attached
|
65
|
+
Sun Oct 15 08:50:58 2017 : Warning: [/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay" found in filter list
|
66
|
+
for realm "DEFAULT".
|
67
|
+
Sun Oct 15 08:50:58 2017 : Warning: [/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay-USec" found in filter list
|
68
|
+
for realm "DEFAULT".
|
69
|
+
Sun Oct 15 08:50:58 2017 : Error: tls: Failed reading private key file "/etc/raddb/certs/server.pem"
|
70
|
+
Sun Oct 15 08:50:58 2017 : Error: tls: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
|
71
|
+
Sun Oct 15 08:50:58 2017 : Error: tls: error:23077074:PKCS12 routines:PKCS12_pbe_crypt:pkcs12 cipherfinal error
|
72
|
+
Sun Oct 15 08:50:58 2017 : Error: tls: error:2306A075:PKCS12 routines:PKCS12_item_decrypt_d2i:pkcs12 pbe crypt error
|
73
|
+
```
|
56
|
-
実施した作業
|
74
|
+
###radiusサーバーで実施した作業
|
75
|
+
```
|
57
76
|
yum update
|
58
77
|
yum install freeradius* -y
|
59
78
|
cd /etc/raddb/mods-enabled
|
2
実施した作業を記載しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -52,8 +52,114 @@
|
|
52
52
|
10月 15 04:37:14 vdi-radius01 systemd[1]: Failed to start FreeRADIUS high performance RADIUS server..
|
53
53
|
-- Subject: Unit radiusd.service has failed
|
54
54
|
```
|
55
|
+
```
|
56
|
+
実施した作業
|
57
|
+
yum update
|
58
|
+
yum install freeradius* -y
|
59
|
+
cd /etc/raddb/mods-enabled
|
60
|
+
ln -s ../mods-available/ldap ldap
|
61
|
+
chown root.radiusd ldap
|
55
62
|
|
63
|
+
vi /etc/raddb/mods‐available/ldap
|
64
|
+
12 server = "192.168.xxx.xxx"(LdapサーバーのIP)
|
65
|
+
16 port = 389
|
66
|
+
19 identity = "cn=Manager,dc=exampe,dc=com"
|
67
|
+
20 password = hoge
|
68
|
+
24 base_dn = "ou=People,dc=exampe,dc=com"
|
69
|
+
120 scope = 'one'
|
70
|
+
163 scope = 'one'
|
71
|
+
398 start_tls = no
|
72
|
+
400 ca_file = ${certdir}/ca.pem
|
73
|
+
403 ca_path = ${certdir}
|
56
74
|
|
75
|
+
|
76
|
+
/etc/raddb/radius.conf
|
77
|
+
321 auth = yes
|
78
|
+
329 auth_badpass = yes
|
79
|
+
|
80
|
+
/etc/raddb/proxy.conf ( this change probably can be obmitted)
|
81
|
+
134 ipaddr = 192.168.xxx.xxx(radiusサーバーのIP)
|
82
|
+
|
83
|
+
/etc/raddb/mods‐available/eap
|
84
|
+
176 private_key_password = 1234
|
85
|
+
|
86
|
+
|
87
|
+
Add to the file
|
88
|
+
/etc/raddb/mods-config/files/authorize
|
89
|
+
1 DEFAULT Auth-Type == EAP
|
90
|
+
2 Tunnel-Type = VLAN,
|
91
|
+
3 Tunnel-Medium-Type = IEEE-802
|
92
|
+
|
93
|
+
/etc/raddb/clients.conf
|
94
|
+
220 #client localhost_ipv6 {
|
95
|
+
221 # ipv6addr = ::1
|
96
|
+
222 # secret = testing123
|
97
|
+
223 #}
|
98
|
+
268 client network {
|
99
|
+
269 ipv4addr = 192.168.124.0/24
|
100
|
+
270 proto = *
|
101
|
+
271 secret = cisco
|
102
|
+
272 require_message_authenticator = no
|
103
|
+
273 nas_type = other
|
104
|
+
274 limit {
|
105
|
+
275 max_connections = 16
|
106
|
+
276 lifetime = 0
|
107
|
+
277 idle_timeout = 30
|
108
|
+
278 }
|
109
|
+
279 }
|
110
|
+
|
111
|
+
/etc/raddb/certs/ca.cnf
|
112
|
+
45 input_password = 1234
|
113
|
+
46 output_password = 1234
|
114
|
+
50 countryName = JP
|
115
|
+
51 stateOrProvinceName = TOKYO
|
116
|
+
52 localityName = TOKYO
|
117
|
+
53 organizationName = example.inc
|
118
|
+
54 #emailAddress = admin@example.com
|
119
|
+
|
120
|
+
/etc/raddb/certs/server.cnf
|
121
|
+
44 input_password = 1234
|
122
|
+
45 output_password = 1234
|
123
|
+
48 countryName = JP
|
124
|
+
49 stateOrProvinceName = TOKYO
|
125
|
+
50 localityName = TOKYO
|
126
|
+
51 organizationName = example.inc
|
127
|
+
52 #emailAddress = admin@example.com
|
128
|
+
|
129
|
+
11.) Make the verification keys and so on
|
130
|
+
証明書ファイルを作成
|
131
|
+
# ディレクトリを移動
|
132
|
+
cd /etc/raddb/certs/
|
133
|
+
|
134
|
+
# CAの秘密鍵と証明書を作成
|
135
|
+
openssl req -new -x509 -keyout ca.key -out ca.pem -days `grep default_days ca.cnf | sed 's/.*=//;s/^ *//'` -config ./ca.cnf
|
136
|
+
|
137
|
+
# サーバーの秘密鍵と証明書を作成
|
138
|
+
openssl req -new -out server.csr -keyout server.key -config ./server.cnf
|
139
|
+
|
140
|
+
# index.txtファイルを初期化
|
141
|
+
: > index.txt
|
142
|
+
|
143
|
+
# サーバー証明書にCAの署名をする
|
144
|
+
openssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key `grep output_password ca.cnf | sed 's/.*=//;s/^ *//'` -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
|
145
|
+
|
146
|
+
# サーバー秘密鍵と証明書のファイルをまとめる
|
147
|
+
openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'`
|
148
|
+
|
149
|
+
# サーバー秘密鍵と証明書のフォーマットを変換
|
150
|
+
openssl pkcs12 -in server.p12 -out server.pem -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'`
|
151
|
+
|
152
|
+
# 証明書の正当性を検証
|
153
|
+
openssl verify -CAfile ca.pem server.pem
|
154
|
+
|
155
|
+
# ディレクトリを移動
|
156
|
+
cd
|
157
|
+
|
158
|
+
12.)
|
159
|
+
START the radius server
|
160
|
+
systemctl start radius
|
161
|
+
```
|
162
|
+
|
57
163
|
###試したこと
|
58
164
|
yum reinstall freeradius.x86_64
|
59
165
|
yum reinstall freeradius-ldap.x86_64
|
1
試したこと に rm -rf /var/lib/radiusdで設定ファイルを削除後に再インストールを追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -60,6 +60,11 @@
|
|
60
60
|
yum reinstall freeradius-utils.x86_64
|
61
61
|
|
62
62
|
再起動
|
63
|
+
|
64
|
+
|
65
|
+
mysqlの完全アンインストールを参考にしてrm -rf /var/lib/radiusdで設定ファイルを削除後に再インストール
|
66
|
+
|
63
67
|
するも不変でした。ご協力をお願い致します。
|
68
|
+
|
64
69
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
65
70
|
cent os 7です
|