0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

簡易的にRADIUSサーバーを構築する

Posted at

RADIUSサーバー構築

機器構成

.3 192.168.1.0/24 .1 | .2 10.0.0.0/24 .1
PC -------------------- RT_1 ---------------- Desktop_PC (freeradius)

検証手順

Desktop_PC (freeradius)

  1. 必要なパッケージをインストール
    1. sudo apt install freeradius freeradius-utils freeradius-mysql
  2. 一時的にrootユーザーに変更して、/etc/freebsd/3.0ディレクトリへ移動する
    1. 編集するファイルはmods-config/files/authorizeclients.conf
  3. mods-config/files/authorizeに次の記述を追加する(RADIUS認証で使用するuser, passwordの登録)
    1. [username] Cleartext-Password := [password]
  4. clients.confを以下の変更を加える
       client localnet { 
               ipaddr = [IP Address  that is permitted]
               sercret = [secret password]            
           }
    
  5. freeradiusを再起動する
    1. sudo systemctl restart freeraidus.service
  6. PCからtelnetでRT_1にログインする時[username]と[password]を使用してログインできるか確認する

検証ログ

接続失敗時(freeradiusのログ)

/var/log/freeraius/radius.log

Mon Apr 10 11:01:26 2023 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client 10.0.0.2 port 1645 proto udp

接続失敗時 (RTのログ)

2023/04/10 11:28:05: [RADIUS] Receive Access-Reject (id: 14)
2023/04/10 11:28:04: [RADIUS] Send Access-Request to 10.0.0.1 (id: 14, name: ya
maha1, count: 1)

■原因
3.1の[username]が間違っていた

接続成功 (RTのログ)

2023/04/10 13:03:24: [RADIUS] Receive Access-Accept (id: 17)
2023/04/10 13:03:24: [RADIUS] Send Access-Request to 10.0.0.1 (id: 17, name: yamaha, count: 1)

その他

Linuxの詳細なログを表示したいときは
sudo journalctl -u [service name]

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?