回答編集履歴

5

修正

2019/03/23 08:41

投稿

scsi
scsi

スコア2840

test CHANGED
@@ -34,7 +34,7 @@
34
34
 
35
35
  (1) Framed-IP-Address = 192.168.0.101
36
36
 
37
- (1) NAS-IP-Address = 123.123.123.123 ※私のサーバのIP
37
+ (1) NAS-IP-Address = 123.123.123.123 ※サーバのIP(仮)
38
38
 
39
39
  (1) NAS-Port = 0
40
40
 

4

編集

2019/03/23 08:41

投稿

scsi
scsi

スコア2840

test CHANGED
@@ -1 +1,75 @@
1
1
  定期的にMACアドレスのリストをLDAPからファイルに落とすようにとかはどうでしょうか?
2
+
3
+
4
+
5
+ [追記]
6
+
7
+ 私の持っているldap認証に対応した freeradius サーバでテストしてみました。
8
+
9
+ radiusd を -X オプションで起動した時に私のサーバでは認証時に下記のリクエストが届きます。
10
+
11
+ vpnの接続時のppp認証で使用しているので Request に Macアドレスがありません。
12
+
13
+ Macアドレスがある場合は、 Calling-Station-Id に値が入っていると思います。
14
+
15
+
16
+
17
+ ```
18
+
19
+ (1) Received Accounting-Request Id 11 from 127.0.0.1:56766 to 127.0.0.1:1813 length 108
20
+
21
+ (1) Acct-Session-Id = "5C95EDCF6BEF00"
22
+
23
+ (1) User-Name = "scsi@example.com" ※認証ID
24
+
25
+ (1) Acct-Status-Type = Start
26
+
27
+ (1) Service-Type = Framed-User
28
+
29
+ (1) Framed-Protocol = PPP
30
+
31
+ (1) Acct-Authentic = RADIUS
32
+
33
+ (1) NAS-Port-Type = Async
34
+
35
+ (1) Framed-IP-Address = 192.168.0.101
36
+
37
+ (1) NAS-IP-Address = 123.123.123.123 ※私のサーバのIP
38
+
39
+ (1) NAS-Port = 0
40
+
41
+ (1) Acct-Delay-Time = 0
42
+
43
+ ```
44
+
45
+
46
+
47
+ NAS-IP-Address を Mac アドレスと見立てて、 description アトリビュートに登録しました。
48
+
49
+
50
+
51
+ ```
52
+
53
+ ldapの登録情報
54
+
55
+ ldapsearch -x mailroutingaddress=scsi@example.com mailroutingaddress description
56
+
57
+ dn: uid=scsi,ou=People,dc=example,dc=com
58
+
59
+ mailRoutingAddress: scsi@example.com
60
+
61
+ description: 123.123.123.123
62
+
63
+ ```
64
+
65
+
66
+
67
+ この状態で /etc/raddb/mods-available/ldap の filter を下記にしました。
68
+
69
+ ```
70
+
71
+ filter = "(&(mailRoutingAddress=%{%{Stripped-User-Name}:-%{User-Name}})(description=%{NAS-IP-Address}))"
72
+
73
+ ```
74
+
75
+ これで認証が成功しましたので、応用すれば Macアドレスでのフィルタリングはldapでできるのではないでしょうか?

3

修正

2019/03/23 08:38

投稿

scsi
scsi

スコア2840

test CHANGED
@@ -1,9 +1 @@
1
- freeradiusでldap認証はやったこありま
1
+ 定期的にMACアドレスのリストをLDAPからファイルに落とすようにとかはどうでしょうか?
2
-
3
- 私が試したのはvpnの認証ですが
4
-
5
- 出来るんじゃないですかね。
6
-
7
-
8
-
9
- [Centos7](https://memo.ma3ki.net/centos7-sakura-vps/19-sakura-vps-centos-vpn/)ですが参考になるかな、ならないかな

2

修正

2019/03/22 21:14

投稿

scsi
scsi

スコア2840

test CHANGED
@@ -1,9 +1,9 @@
1
- freeradiusでldap認証はできます
1
+ freeradiusでldap認証はやったことあります。
2
2
 
3
- 私が試したのはvpnの認証ですが
3
+ 私が試したのはvpnの認証ですが
4
4
 
5
- ちょっといじったら出来るんじゃないですかね。
5
+ 出来るんじゃないですかね。
6
6
 
7
7
 
8
8
 
9
- [Centos7](https://memo.ma3ki.net/centos7-sakura-vps/19-sakura-vps-centos-vpn/)ですが参考になるかな
9
+ [Centos7](https://memo.ma3ki.net/centos7-sakura-vps/19-sakura-vps-centos-vpn/)ですが参考になるかな、ならないかな

1

修正

2019/03/22 20:59

投稿

scsi
scsi

スコア2840

test CHANGED
@@ -6,6 +6,4 @@
6
6
 
7
7
 
8
8
 
9
- 下記にCentos7ですが参考になるかな
10
-
11
- https://memo.ma3ki.net/centos7-sakura-vps/19-sakura-vps-centos-vpn/
9
+ [Centos7](https://memo.ma3ki.net/centos7-sakura-vps/19-sakura-vps-centos-vpn/)ですが参考になるかな