February 2022

You are currently browsing the monthly archive for February 2022.

在上篇文章中使用了ISE作为AAA server,ISE功能上虽然较多,但是对于新手操作起来还是有些繁琐。所以我在想是否能找到AAA server替代品,只需要简单的配置就可以满足我认证测试的需求,然后我就找到freeradius。所以本文就介绍下我在测试freeradius时遇到的一些坑以及排错。

freeradius/freeradius-server

Starting the server

docker run --rm --name my-radius -d freeradius/freeradius-server

使用上述命令就可以快速创建一个radius server,添加“–rm”使容器停止后自动删除.

由于这个容器中没vi/nano command,我无法去编辑配置文件,所以在将docker run起来后进去将配置文件copy 出来一份,在本地进行修改。

[root@server1 ~]# docker exec -it my-radius /bin/bash
root@3c05e2ec2770:/# cd /etc/raddb
root@3c05e2ec2770:/etc/raddb# ls -al
total 148
drwxr-s--x. 9 freerad freerad  4096 Oct  7 19:58 .
drwxr-xr-x. 1 root    root       66 Feb 22 02:21 ..
-rw-r--r--. 1 root    root    20819 Oct  7 17:00 README.rst
drwxr-s--x. 2 freerad freerad  4096 Oct  7 20:00 certs
-rw-r-----. 1 root    freerad  8323 Oct  7 17:00 clients.conf
-rw-r--r--. 1 root    freerad  1440 Oct  7 17:00 dictionary
-rw-r-----. 1 root    freerad  2661 Oct  7 17:00 experimental.conf
lrwxrwxrwx. 1 root    root       28 Oct  7 17:00 hints -> mods-config/preprocess/hints
lrwxrwxrwx. 1 root    root       33 Oct  7 17:00 huntgroups -> mods-config/preprocess/huntgroups
drwxr-xr-x. 2 root    root     4096 Oct  7 19:58 mods-available
drwxr-xr-x. 9 root    root      126 Oct  7 19:58 mods-config
drwxr-xr-x. 2 root    root     4096 Oct  7 19:58 mods-enabled
-rw-r--r--. 1 root    root       52 Oct  7 17:00 panic.gdb
drwxr-s--x. 2 freerad freerad   205 Oct  7 19:58 policy.d
-rw-r-----. 1 root    freerad 28825 Oct  7 17:00 proxy.conf
-rw-r-----. 1 root    freerad 31521 Oct  7 17:00 radiusd.conf
drwxr-s--x. 2 freerad freerad  4096 Oct  7 19:58 sites-available
drwxr-s--x. 2 freerad freerad    41 Oct  7 19:58 sites-enabled
-rw-r--r--. 1 root    root     3470 Oct  7 17:00 templates.conf
-rw-r--r--. 1 root    root     8536 Oct  7 17:00 trigger.conf
lrwxrwxrwx. 1 root    root       27 Oct  7 17:00 users -> mods-config/files/authorize
root@3c05e2ec2770:/etc/raddb# 
root@3c05e2ec2770:/etc/raddb# 
root@3c05e2ec2770:/etc/raddb# cat clients.conf
root@3c05e2ec2770:/etc/raddb# cat mods-config/files/authorize
root@3c05e2ec2770:/etc/raddb# cat /etc/freeradius/sites-enabled/default
root@3c05e2ec2770:/etc/raddb# exit
exit
[root@server1 ~]# docker stop  my-radius      <<< 停止容器,因为后面我们要使用自己定义的配置文件启动
my-radius
[root@server1 ~]# 
Read the rest of this entry »

Reference

本文章是自己配置ISE过程的总结,主要参考的是上面文章, 其中最主要的是第一篇(知乎),我认为是最全的ISE配置介绍。

ISE Setup(3.1)

ISE启用设备管理

Administration->System->Deployment

Read the rest of this entry »

Notes.

aaa authorization exec console local
aaa authentication login console local
aaa authorization commands console none

line console
 authorization commands console
 login authentication console
 authorization exec console

在变更AAA配置之前一定要确保将console 配置为本地认证授权, 防止错误的配置导致无法修改配置.

或者在变更AAA配置时不使用commit,使用”commit confirmed minutes x“.

这条命令的意思是如果不进行第二次”commit“ 操作,配置将在x分钟后进行配置回滚

RP/0/RSP0/CPU0:ios(config)#commit confirmed minutes 5
测试AAA, 测试无误后再进行commit
RP/0/RSP0/CPU0:ios(config)#commit

default VRF

tacacs source-interface Loopback0 vrf default
tacacs-server host 10.70.79.177 port 49
 key 7 110A1016141D
!
aaa accounting commands default start-stop group tacacs+
aaa authorization exec console local
aaa authorization exec default group tacacs+ local
aaa authorization commands console none
aaa authorization commands default group tacacs+ none
aaa authentication login console local
aaa authentication login default group tacacs+ local

non-default VRF

tacacs source-interface MgmtEth0/RSP0/CPU0/0 vrf MGMT
tacacs-server host 10.70.79.177 port 49
 key 7 110A1016141D
!
aaa accounting commands default start-stop group XU
aaa group server tacacs+ XU
 server 10.70.79.177
 vrf MGMT
!
aaa authorization exec console local
aaa authorization exec default group XU local
aaa authorization commands console none
aaa authorization commands default group XU none
aaa authentication login console local
aaa authentication login default group XU local
Read the rest of this entry »