Remote Access VPN (IPsec) - IOS - radius (ACS)
Two posts earlier I mentioned about another way how to control traffic in the VPN tunnel – a downloadable access list. This way is the most flexible because we can define different policies per user or group. The static control, I implemented together with isakmp and ipsec policies, allow on only one access list. Today I add a radius server to the existing configuration you can find here.
I start with a new aaa configuration:
!
radius-server host 192.168.202.151 key cisco123!
!
aaa authentication login USERS group radius
aaa authorization network AUTH-LIST group radius
!
On ACS I need to add a Network Device:
Next I need to add a new user – ezvpn:
My ezVPN configuration:
!
crypto isakmp policy 1
encr aes
authentication pre-share
group 2
crypto isakmp client configuration address-pool local POOL
!
crypto isakmp client configuration group ezvpn
key cisco
pool POOL
acl 101
crypto isakmp profile ISAKMP-PRF
match identity group ezvpn
client authentication list USERS
isakmp authorization list AUTH-LIST
client configuration address respond
client configuration group ezvpn
virtual-template 1
!
!
crypto ipsec transform-set TS esp-aes 256 esp-sha-hmac
mode tunnel
!
crypto ipsec profile IPSEC-PRF
set transform-set TS
set reverse-route tag 1
set isakmp-profile ISAKMP-PRF
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Loopback7
ip address 7.7.7.7 255.255.255.0
!
interface Loopback8
ip address 8.8.8.8 255.255.255.0
!
interface Loopback9
ip address 9.9.9.9 255.255.255.0
!
interface Loopback10
ip address 192.168.1.1 255.255.255.0
ip nat inside
!
interface FastEthernet0/0
ip address 10.0.0.2 255.255.255.0
ip nat outside
speed auto
duplex auto
!
interface Virtual-Template1 type tunnel
ip unnumbered Loopback0
ip access-group 105 in
tunnel mode ipsec ipv4
tunnel protection ipsec profile IPSEC-PRF
!
Now I need to add a few radius attributes:
Once my Authorization Profile (ezvpn) is completed:
I need to add it to the new Access Policy:
Ok, I can test it now:
And as you see everything works fine. Let’s check how looks like the communication with the radius server:
R14#
*Nov 24 04:48:41.182: RADIUS/ENCODE(00000071):Orig. component type = VPN IPSEC
*Nov 24 04:48:41.186: RADIUS: AAA Unsupported Attr: interface [221] 8 1767298796
*Nov 24 04:48:41.190: RADIUS(00000071): Config NAS IP: 0.0.0.0
*Nov 24 04:48:41.190: RADIUS(00000071): Config NAS IPv6: ::
*Nov 24 04:48:41.190: RADIUS/ENCODE(00000071): acct_session_id: 102
*Nov 24 04:48:41.194: RADIUS(00000071): sending
*Nov 24 04:48:41.202: RADIUS/ENCODE: Best Local IP-Address 10.0.0.2 for Radius-Server 192.168.202.151
*Nov 24 04:48:41.202: RADIUS(00000071): Sending a IPv4 Radius Packet
*Nov 24 04:48:41.206: RADIUS(00000071): Send Access-Request to 192.168.202.151:1645 id 1645/54,len 96
*Nov 24 04:48:41.210: RADIUS: authenticator 85 11 68 DF 40 B7 3E 6C - 76 C1 42 60 EA 3A 76 A3
*Nov 24 04:48:41.210: RADIUS: User-Name [1] 7 "ezvpn"
*Nov 24 04:48:41.214: RADIUS: User-Password [2] 18 *
*Nov 24 04:48:41.214: RADIUS: Calling-Station-Id [31] 17 "192.168.202.1
R14#64"
*Nov 24 04:48:41.218: RADIUS: NAS-Port-Type [61] 6 Virtual [5]
*Nov 24 04:48:41.218: RADIUS: NAS-Port [5] 6 1
*Nov 24 04:48:41.222: RADIUS: NAS-Port-Id [87] 10 "10.0.0.2"
*Nov 24 04:48:41.222: RADIUS: Service-Type [6] 6 Outbound [5]
*Nov 24 04:48:41.222: RADIUS: NAS-IP-Address [4] 6 10.0.0.2
*Nov 24 04:48:41.226: RADIUS(00000071): Started 5 sec timeout
*Nov 24 04:48:41.238: RADIUS: Received from id 1645/54 192.168.202.151:1645, Access-Accept, len 187
*Nov 24 04:48:41.238: RADIUS: authenticator ED 99 C9 F7 7B B6 A1 B4 - 73 0F D8 99 67 26 0A 88
*Nov 24 04:48:41.242: RADIUS: User-Name [1] 7 "ezvpn"
*Nov 24 04:48:41.242: RADIUS: Service-Type [6] 6 Outbound [5]
*Nov 24 04:48:41.246: RADIUS: Class [25] 23
*Nov 24 04:48:41.246: RADIUS: 43 41 43 53 3A 61 63 73 2F 31 37 38 30 33
R14#34 35 [CACS:acs/1780345]
*Nov 24 04:48:41.250: RADIUS: 32 38 2F 33 30 [ 28/30]
*Nov 24 04:48:41.250: RADIUS: Tunnel-Password [69] 21 01:*
*Nov 24 04:48:41.254: RADIUS: Vendor, Cisco [26] 23
*Nov 24 04:48:41.254: RADIUS: Cisco AVpair [1] 17 "ipsec:inacl=101"
*Nov 24 04:48:41.258: RADIUS: Vendor, Cisco [26] 29
*Nov 24 04:48:41.258: RADIUS: Cisco AVpair [1] 23 "ipsec:tunnel-type=ESP"
*Nov 24 04:48:41.262: RADIUS: Vendor, Cisco [26] 30
*Nov 24 04:48:41.262: RADIUS: Cisco AVpair [1] 24 "ipsec:key-exchange=IKE"
*Nov 24 04:48:41.266: RADIUS: Vendor, Cisco [26] 28
*Nov 24 04:48:41.266: RADIUS: Cisco AVpair [1] 22 "ipsec:addr-pool=POOL"
*Nov 24 04:48:41.266: RADIUS(00000071): Received from id 1645/54
R14#
[prompt: user/password]
*Nov 24 04:49:50.542: RADIUS/ENCODE(00000072):Orig. component type = VPN IPSEC
*Nov 24 04:49:50.546: RADIUS: AAA Unsupported Attr: interface [221] 8 1767296348
*Nov 24 04:49:50.546: RADIUS/ENCODE(00000072): dropping service type, "radius-server attribute 6 on-for-login-auth" is off
*Nov 24 04:49:50.550: RADIUS(00000072): Config NAS IP: 0.0.0.0
*Nov 24 04:49:50.550: RADIUS(00000072): Config NAS IPv6: ::
*Nov 24 04:49:50.554: RADIUS/ENCODE(00000072): acct_session_id: 103
*Nov 24 04:49:50.554: RADIUS(00000072): sending
*Nov 24 04:49:50.562: RADIUS/ENCODE: Best Local IP-Address 10.0.0.2 for Radius-Server 192.168.202.151
*Nov 24 04:49:50.566: RADIUS(00000072): Sending a IPv4 Radius Packet
*Nov 24 04:49:50.570: RADIUS(00000072): Send Access-Request to 192.168.202.151:1645 id 1645/55,len 90
*Nov 24 04:49:50.570: RADIUS: authenticator EC 29 B2 98 F2 40 DA CF - 9F 30 70 9D FC 1E 76 9A
*Nov 24 04:49:50.574: RADIUS: User-Name [1] 7 "ezvpn"
*Nov 24 04:49:5
R14#0.574: RADIUS: User-Password [2] 18 *
*Nov 24 04:49:50.578: RADIUS: Calling-Station-Id [31] 17 "192.168.202.164"
*Nov 24 04:49:50.578: RADIUS: NAS-Port-Type [61] 6 Virtual [5]
*Nov 24 04:49:50.582: RADIUS: NAS-Port [5] 6 1
*Nov 24 04:49:50.586: RADIUS: NAS-Port-Id [87] 10 "10.0.0.2"
*Nov 24 04:49:50.586: RADIUS: NAS-IP-Address [4] 6 10.0.0.2
*Nov 24 04:49:50.590: RADIUS(00000072): Started 5 sec timeout
*Nov 24 04:49:50.646: RADIUS: Received from id 1645/55 192.168.202.151:1645, Access-Accept, len 187
*Nov 24 04:49:50.646: RADIUS: authenticator F0 61 32 56 C8 30 9F 78 - C3 54 02 0A E9 00 80 A1
*Nov 24 04:49:50.650: RADIUS: User-Name [1] 7 "ezvpn"
*Nov 24 04:49:50.650: RADIUS: Service-Type [6] 6 Outbound [5]
*Nov 24 04:49:50.654: RADIUS: Class [25] 23
*Nov 24 04:49:50.654: RADIUS: 43 41 43 53
R14# 3A 61 63 73 2F 31 37 38 30 33 34 35 [CACS:acs/1780345]
*Nov 24 04:49:50.658: RADIUS: 32 38 2F 33 31 [ 28/31]
*Nov 24 04:49:50.658: RADIUS: Tunnel-Password [69] 21 01:*
*Nov 24 04:49:50.662: RADIUS: Vendor, Cisco [26] 23
*Nov 24 04:49:50.666: RADIUS: Cisco AVpair [1] 17 "ipsec:inacl=101"
*Nov 24 04:49:50.666: RADIUS: Vendor, Cisco [26] 29
*Nov 24 04:49:50.666: RADIUS: Cisco AVpair [1] 23 "ipsec:tunnel-type=ESP"
*Nov 24 04:49:50.670: RADIUS: Vendor, Cisco [26] 30
*Nov 24 04:49:50.670: RADIUS: Cisco AVpair [1] 24 "ipsec:key-exchange=IKE"
*Nov 24 04:49:50.674: RADIUS: Vendor, Cisco [26] 28
*Nov 24 04:49:50.674: RADIUS: Cisco AVpair [1] 22 "ipsec:addr-pool=POOL"
*Nov 24 04:49:50.674: RADIUS(00000072): Received from id 1645/55
*Nov 24 04:49:50.754: RADIUS/ENCODE(00000072):Orig. component type = VPN IPSEC
*Nov 24 04:49:50.758: RADIUS: AAA Unsupported Attr: interface
R14# [221] 8 1767296348
*Nov 24 04:49:50.758: RADIUS(00000072): Config NAS IP: 0.0.0.0
*Nov 24 04:49:50.762: RADIUS(00000072): Config NAS IPv6: ::
*Nov 24 04:49:50.762: RADIUS/ENCODE(00000072): acct_session_id: 103
*Nov 24 04:49:50.766: RADIUS(00000072): sending
*Nov 24 04:49:50.774: RADIUS/ENCODE: Best Local IP-Address 10.0.0.2 for Radius-Server 192.168.202.151
*Nov 24 04:49:50.778: RADIUS(00000072): Sending a IPv4 Radius Packet
*Nov 24 04:49:50.782: RADIUS(00000072): Send Access-Request to 192.168.202.151:1645 id 1645/56,len 96
*Nov 24 04:49:50.782: RADIUS: authenticator E3 45 78 5A 44 3F 76 4C - C6 B0 C8 45 A1 90 0D FF
*Nov 24 04:49:50.786: RADIUS: User-Name [1] 7 "ezvpn"
*Nov 24 04:49:50.786: RADIUS: User-Password [2] 18 *
*Nov 24 04:49:50.790: RADIUS: Calling-Station-Id [31] 17 "192.168.202.164"
*Nov 24 04:49:50.790: RADIUS: NAS-Port-Type [61] 6 Virtual [5]
*Nov 24 04:49:50.794: RADIUS: NAS-Port [5]
R14# 6 1
*Nov 24 04:49:50.794: RADIUS: NAS-Port-Id [87] 10 "10.0.0.2"
*Nov 24 04:49:50.794: RADIUS: Service-Type [6] 6 Outbound [5]
*Nov 24 04:49:50.794: RADIUS: NAS-IP-Address [4] 6 10.0.0.2
*Nov 24 04:49:50.798: RADIUS(00000072): Started 5 sec timeout
*Nov 24 04:49:50.818: RADIUS: Received from id 1645/56 192.168.202.151:1645, Access-Accept, len 187
*Nov 24 04:49:50.818: RADIUS: authenticator 23 1B B6 C3 77 5E 76 C3 - 02 62 64 37 D6 51 F7 E5
*Nov 24 04:49:50.822: RADIUS: User-Name [1] 7 "ezvpn"
*Nov 24 04:49:50.822: RADIUS: Service-Type [6] 6 Outbound [5]
*Nov 24 04:49:50.826: RADIUS: Class [25] 23
*Nov 24 04:49:50.826: RADIUS: 43 41 43 53 3A 61 63 73 2F 31 37 38 30 33 34 35 [CACS:acs/1780345]
*Nov 24 04:49:50.830: RADIUS: 32 38 2F 33 32 [ 28/32]
*Nov 24 04:49:50.830: RADIUS: Tunnel-Password [69]
R14# 21 01:*
*Nov 24 04:49:50.834: RADIUS: Vendor, Cisco [26] 23
*Nov 24 04:49:50.834: RADIUS: Cisco AVpair [1] 17 "ipsec:inacl=101"
*Nov 24 04:49:50.838: RADIUS: Vendor, Cisco [26] 29
*Nov 24 04:49:50.838: RADIUS: Cisco AVpair [1] 23 "ipsec:tunnel-type=ESP"
*Nov 24 04:49:50.838: RADIUS: Vendor, Cisco [26] 30
*Nov 24 04:49:50.838: RADIUS: Cisco AVpair [1] 24 "ipsec:key-exchange=IKE"
*Nov 24 04:49:50.838: RADIUS: Vendor, Cisco [26] 28
*Nov 24 04:49:50.838: RADIUS: Cisco AVpair [1] 22 "ipsec:addr-pool=POOL"
*Nov 24 04:49:50.838: RADIUS(00000072): Received from id 1645/56
*Nov 24 04:49:50.874: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to down
*Nov 24 04:49:51.398: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to up
R14#
I tested my settings without some radius attributes and below ones are mandatory:
As you see all radius attributes are sent correctly and the tunnel is working fine as before with local settings. If you need different policy for another user you can add next Authorization Policy with for example different access list.