Showing results for 
Search instead for 
Did you mean: 

ASA: IDFW (Identity Firewall) Step by Step configuration





With Identity firewall, we can configure access-list and allow/restrict permission based on users and/or groups that exist in the Active Directory Domain.



This  configuration example is meant to be interpreted with the aid of the  official documentation from the configuration guide located here:


AD-Agent Configuration







The ASA must be running minimum 8.4.2 code to be able to configure IDFW feature.


The AD Agent must be installed on a Windows server that is accessible to the ASA. Additionally, you must configure the AD Agent to obtain  information from the Active Directory servers. Configure the AD Agent to communicate with the ASA.


Supported Windows servers include Windows 2003, Windows 2008, and Windows 2008 R2.

Windows 2003 R2 is not supported for the AD Agent server.


ASA sends encrypted log in information to the  Active Directory server by using SSL enabled over LDAP. SSL must be enabled on the Active Directory server.




A full URL as a destination address is not supported.

•     MAC address checking by the Identity Firewall does not work when intervening routers are present.

The following ASA features do not support using the identity-based object and FQDN:



Crypto map



group-policy (except VPN filter)




Feature is supported in all models of ASAs.

Feature is supported in all modes of ASAs - transparent, routed, single and multiple-context mode.

Total users supported - ASA5505 (1024 users), Other model ASAs support 64K users

Total groups supported - 256 groups

Total number of IPs per user in a domain - 8 IP addresses


AD Agent can support up to 100 client devices and  30 domain controller machines, and can internally cache up to 64,000  IP-to-user-identity mappings.


ASA - The Identity Firewall supports defining only two AD-Agent hosts. This applies to single as well as multiple contexts. Each context can support only 2 AD-Agents.



Description Topology

DC and AD-Agent Co-loated on the same box. No redundancy. The step by step configuration below is based off of this topology.


DC and AD-Agent on different boxes. No redundancy.


Multiple DCs and Single AD-Agent - all on separate boxes.

Offers redundancy.


Multiple DCs and multiple AD-Agent - all on separate boxes. Offers redundancy. For example if you have 30 domain controllers, you would need 2 AD-Agent boxes. Each AD-Agent will have all 30 DCs configured on it to receive login/logoff events from. You would configure both the AD-Agents on the ASA. ASA will talk to only one AD-Agent at a time and use the other as backup.


If you have more than 30 domain controllers, then consider multiple context. Each context follows the same IDFW rules. Each context can support only 2 AD-Agents. 





Licensing for IDFW

Base License - All Models




Step by Step Configuration


1. Configure the Active Directory Domain (on the ASA)

Gather the following information:

a. AD Domain Controller Server IP address

b. Distinguished Name for LDAP base dn

c. Create a UserID and password on the DC that the ASA/IDFW will use to connect to the DC (Domain Controller)


The DC's name is By configuring the ldap-base-dn,

AD server will know where it should begin searching when it receives an authorization request.

KUSANKAR-ASA-5505(config)# aaa-server AD1 protocol ldap

KUSANKAR-ASA-5505(config-aaa-server-group)#aaa-server AD1 (inside) host

KUSANKAR-ASA-5505(config-aaa-server-host)# ldap-base-dn DC=DC1,DC=SAMPLE,DC=com

KUSANKAR-ASA-5505(config-aaa-server-host)# ldap-scope subtree

KUSANKAR-ASA-5505(config-aaa-server-host)# server-type microsoft

KUSANKAR-ASA-5505(config-aaa-server-host)# server-port 389

By default the ASA talks to the DC using port tcp 389. If SSL is enabled on the DC then we need to enable ldap-over-ssl on the ASA as well, and also configure server-port 636 so the ASA can talk to the DC using port 636. This is optional.


KUSANKAR-ASA-5505(config-aaa-server-host)# ldap-over-ssl enable

KUSANKAR-ASA-5505(config-aaa-server-host)# server-port 636


Configure the userID (kusankar) and password on the AD Server for the ASA to be able to log into the AD Domain.


hostname(config-aaa-server-host)# ldap-login-dn DC1\kusankar ("ldap-login-dn kusankar" is also correct)

hostname(config-aaa-server-host)# ldap-login-password cisco123


If configuring via ADSM watch the screen shot below to create the AAA server group:




2. Configure the AD Agent either on the DC or on a member server in the domain

Download AD Agent installer from here: File Name: AD_Agent-v1.0.0.32-build-539-Installer.exe


In this example the AD Agent is installed on the Domain Controller.  The AD Agent as the folloiwng components.

  1. Radius Server - Interacts with the ASA
  2. AD Observer - Monitors AD Domains Controllers and updates the Agent DB.
  3. WatchDog - Monitors AD Observer and Radius
  4. CLI - commands to add the ASA as well as the DC on the AD Agent.

a. Install AD Agent on the DC or member server.

The installer will install the AD Agent in the C:\IBF\ (IBF - Identity Based Firewall) directory of the Windows machine.


Clicking on the "show details" button will show the files being copied.



b. Confirm the AD_Agent install

Go to the command prompt on the Windows machine and run "adactrl.exe show running" from the path C:\IBF\CLI

The output similar to this will be seen.


c. Sending logs from the AD Agent to a syslog server (optional)

From the command line prompt, type "cd C:\IBF\CLI" and then enter the command:

adacfg syslog create -name kiwi-server -ip

If you need help with the options type "adacfg help syslog".


d. Configure the AD Agent to obtain information from all the DCs

  • The DCs should run one of the following OS versions and already be a member in the domain.

         Windows 2003 R2 is not supported for the AD Agent server.


Windows Server 2003

Windows Server 2008 

Windows Server 2008 R2


For 2008 servers should have and hotfixes installed.

For 2008 R2 either SP1 or hotfix should be installed.


  • Make sure the windows firewall or other firewall are not enabled on the DCs. If it does't, then make sure the WMI exceptions are allowed per this link
adacfg client create


  • From the command line prompt, type cd C:\IBF\CLI  (create the ASA as a client on the AD Agent Server). The -secret is the Radius-shared-secret.
   adacfg client create –name KUSANKAR-ASA-5505 –ip –secret cisco 
At the command prompt type "adacfg help client" to get the options and sample command syntax
adacfg dc create
  • From the command line prompt, type cd  C:\IBF\CLI (create all the DCs from which the AD Agent will receive logon logoff events)

     Gather the following information

     DC - Name

     DC - Host name or FQDN

     DC - user (must be a member of domain admin group)

     Password of the above user-ID


To find the FQDN

  1. On the Windows Taskbar, click Start > Programs > Administrative Tools > Active Directory Domains and Trusts.
  2. In the left pane of the Active Directory Domains and Trusts  dialog box, look under Active Directory Domains and Trusts. The FQDN for  the computer or computers is listed.
adacfg dc create -name KS -host kurelisankar -domain -user Administrator -password ww


Once the DC has been added via the "adacfg dc create" command, we can verify the status by the "adacfg dc list" command and make sure the DC shows "UP".


  • Make sure the DCs are configured to send logon logoff events to the security event log.

a. To enable 672/673 (or 4768/4769 for Windows 2008 ) logon events in the Domain Controller event log, choose Start > Administrative Tools > Domain Controller Security Policy on each Domain Controller machine.

b. Choose Security Settings > Local Policies > Audit Policy.

c. Define the policy setting for the Audit Account login events policy (audit success). See screen shot below:


  • Make sure the WMI (Windows Management Instrumentation) Service is started on the AD Agent and the Domain Controllers and the firewall on both these units are either turned off or are allowing the following ports. The following list does not include the dynamically allocated (random) port numbers that are used by WMI.

     1645, 1646, 1812, 1813 - udp

     888 - tcp      

3. Configure the AD Agent on the ASA

ASA config:

Gather the following information:

a. AD Agent IP address (AD Agent could be installed on the DC)

b. Shared secret between ASA and AD agent  (cisco)

KUSANKAR-ASA-5505(config)# aaa-server adagent protocol radius

KUSANKAR-ASA-5505(config-aaa-server-group)# ad-agent-mode

KUSANKAR-ASA-5505(config-aaa-server-group)#aaa-server adagent (inside) host

KUSANKAR-ASA-5505(config-aaa-server-host)# key cisco

KUSANKAR-ASA-5505(config-aaa-server-hos)# user-identity ad-agent aaa-server adagent

Here is the screen shot to configure it from the ASDM side:


Ping and AD-Agent test from the ASA and ping test from AD-Agent:

Test the connectivity between ASA and the adagent with the command "test aaa-server ad-agent adagent".  This test will be successful only if the "name" that was used in "adacfg dc create -name KS -host kurelisankar -domain -user Administrator -password ww", in this case "KS" can be resolved to the DC's IP address. The netbios name KS here is case sentisive.


From AD-Agent:



From ASA:

KUSANKAR-ASA-5505# ping

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:


Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms


KUSANKAR-ASA-5505# test aaa-server ad-agent adagent

Server IP Address or name:

INFO: Attempting Ad-agent test to IP address <> (timeout: 12 seconds)

INFO: Ad-agent Successful

4. Configure Identity Options on the ASA

Configure user-identity config on the ASA. user-identity domain can be  different from the e-mail domain of the company or the domain-name  configured on the ASA. The domain name comes from the simple NETBIOS name of the Active Directory Domain. How to find the NETBIOS name of the AD domain? Very simple. Look at the screen shot below. NETBIOS name is case sensitive. If this is incorrect then the ASA will not make a query out on port 389 to get the users and groups from the AD Server.




hostname(config)#user-identity domain DC1 aaa-server AD1

hostname(config)#user-identity default-domain DC1



User-identity config on the ASDM side:





user-identity optional setting:

** The following commands are optional **


hostname(config)# user-identity logout-probe netbios local-system probe-time minutes 10 retry-in seconds 10 retry-count 2 user-not-needed

hostname(config)# user-identity inactive-user-timer minutes 120

hostname(config)# user-identity poll-import-user-group-timer hours 1

hostname(config)# user-identity action netbios-response-fail remove-user-ip

hostname(config)# user-identity user-not-found enable  

hostname(config)# user-identity action mac-address-mismatch remove-user-ip

hostname(config)# user-identity ad-agent active-user-database full-download

user-identity optional setting from ASDM that matches the above settings:


5. Configure Identity-based (AD user/group based) Access Rules on the ASA.

hostname(config)# object-group user USERS

hostname(config-user-object-group)# user DC1\user1

hostname(config-user-object-group)# user-group DC1\\specialists

hostname(config-user-object-group)# exit

access-list inside-acl extended permit ip user DC1\user1 any host

access-list inside-acl extended permit ip user-group DC1\\specialists any host

access-list inside-acl extended permit ip object-group-user USERS any host

Here is the equivalent of the above from ASDM.
object-group user :

ACL configuration using user, group and object-group-user:

Show commands

show user-identity user active show user-identity user active domain DC1show user-identity user active domain DC1 list

KUSANKAR-ASA-5505# sh user-identity user active domain DC1 list detail

Total active users: 1    Total IP addresses: 1

  DC1: 1 users, 1 IP addresses

  DC1\Administrator: 0 active conns; idle 0 mins login 99 mins, idle 0 mins, 0 active conns

show user-identity user inactive show user-identity user inactive domain DC1

KUSANKAR-ASA-5505# show user-identity user inactive user-group DC1\\specialists

Total inactive users: 1


show user-identity user all

show user-identity user all list

KUSANKAR-ASA-5505# show user-identity user all list detail

Total users: 3    Total IP addresses: 1

  DC1\Administrator: 2 active conns; idle 0 mins login 114 mins, idle 0 mins, 2 active conns inactive inactive

  DC1\user1: 0 active conns

  DC1\user2: 0 active conns


This below command shows all the IP addresses for which the ASA hasn't received IP to USER mapping from the AD-Agent.

KUSANKAR-ASA-5505# sh user-identity user-not-found


This below command shows the groups that have been activation via access-group, policy-map or caputre.

KUSANKAR-ASA-5505# sh user-identity group

Group ID    Activated Group Name (Domain\\Group)

--------    ------------------------------------

       1    DC1\\specialists

       2    LOCAL\\USERS

This below command gives a good status about the Domain from the ad-agent point of view.


show user-identity ad-agent statistics


KUSANKAR-ASA-5505# sh user-identity ad-agent

Primary AD Agent:

Status                    up (registered)

Mode:                     full-download

IP address:     

Authentication port:      udp/1645

Accounting port:          udp/1646

ASA listening port:       udp/3799

Interface:                inside

Up time:                  17 hours 16 mins

Average RTT:              0 msec


AD Domain Status:

Domain DC1:               up


This below command displays all the groups that the ASA has received from the Domain Controller. Output is partial.

KUSANKAR-ASA-5505# show user-identity ad-groups DC1


Domain:DC1    AAA Server Group: AD1

Group list retrieved successfully

Number of Active Directory Groups: 38


dn: CN=DHCP Administrators,CN=Users,DC=DC1,DC=SAMPLE,DC=com

sAMAccountName: DHCP Administrators


sAMAccountName: Domain Users

dn: CN=Domain Guests,CN=Users,DC=DC1,DC=SAMPLE,DC=com

sAMAccountName: Domain Guests

dn: CN=Group Policy Creator Owners,CN=Users,DC=DC1,DC=SAMPLE,DC=com


dn: CN=Technologists,CN=Users,DC=DC1,DC=SAMPLE,DC=com

sAMAccountName: Technologists

dn: CN=Specialists,CN=Users,DC=DC1,DC=SAMPLE,DC=com

sAMAccountName: Specialists


If you need to query one particular group then use this command below:


KUSANKAR-ASA-5505# sh user-identity ad-groups DC1 filter specialists


Domain:DC1    AAA Server Group: AD1

Group list retrieved successfully

Number of Active Directory Groups: 1

dn: CN=Specialists,CN=Users,DC=DC1,DC=SAMPLE,DC=com

sAMAccountName: Specialists



If you need to filter one particular user then, issue this command below


KUSANKAR-ASA-5505# sh user-identity ad-user DC1 filter user1       


Domain:DC1    AAA Server Group: AD1

User list retrieved successfully

Number of Active Directory Users: 1

dn: CN=Ashley Smith,CN=Users,DC=DC1,DC=SAMPLE,DC=com

sAMAccountName: user1


If you need to see the connections opend by user-identity users issue this command below


KUSANKAR-ASA-5505# sh conn user-identity

9 in use, 4379 most used

TCP outside inside, idle 0:04:15, bytes 626, flags UO

TCP outside dmz, idle 0:00:00, bytes 0, flags saA

TCP outside dmz, idle 0:00:01, bytes 0, flags saA

TCP outside inside (DC1\Administrator), idle 0:00:00, bytes 21614768, flags UIOB


If you need to know the IP mapping of a user you can issue this command below


KUSANKAR-ASA-5505# sh user-identity ip-of-user DC1\Administrator det

DC1\ (Login) Login time: 150 mins; Idle time: 0 mins; 2 active conns

If you need user maping of an IP then issue this command below


KUSANKAR-ASA-5505# sh user-identity user-of-ip

DC1\Administrator (Login)



If you need user mapping of a group then issue this commnad below. New users added to an AD group, takes about 8 hours

for the ASA to get the user-group mappings from the AD. We can do that manually on the ASA by "user-identity update import-user"

and make sure they all users that belong in the group show up by issuing "show user-i user-of-gorup CHAS\\monkey" and check the user-group mappings.


KUSANKAR-ASA-5505#show user-i user-of-gorup CHAS\\monkey

Other useful show commands:


show user-identity statistics user

show user-identity statistics top user

sh asp table classify domain user-statistics




debug user-identity user

debug user-identity user-group

debug user-identity ad-agent

debug-user-identity ldap

debug user-identity logout-probe

debug user-identity acl

debug user-identity tmatch

debug user-identity fqdn

debug user-identity process

debug user-identity debug

debug user-identity error

debug ldap 255






Common Problems

AD Agent is unable to talk to the DC - ADObserver debug log shows ERROR: Failed to register

How to enable adobserver debug log:

In the AD-Agent computer under the folder IBF\adobserver  there is a file named "logconfig.ini". We need to enable debug log in this file by changing LOG_NONE to LOG_DEBUG and restarting the AD Agent service.



;this is the logging level


;to disable log, set LOG_LEVEL=LOG_NONE, this is the default.




Problem: The adObserver debug logs give the following:


Thu Jan 05 10:03:18 2012: ~~~~  Logger Started!      Logging Level: LOG_DEBUG  ~~~~

Thu Jan 05 10:03:18 2012: INFO: ------------ IBF PIP++ adObserver (version, build 539) started ------------

Thu Jan 05 10:03:18 2012: INFO: NOTE: Using real IPs (did not find ADO_RANDOM_IP in environment)

Thu Jan 05 10:03:18 2012: DEBUG: Initializing Winsock

Thu Jan 05 10:03:18 2012: DEBUG: Winsock Initialized

Thu Jan 05 10:03:18 2012: DEBUG: Found local machine FQDN:

Thu Jan 05 10:03:18 2012: INFO: Connecting to configuration server

Thu Jan 05 10:03:18 2012: INFO: Configuration loaded successfully from server

Thu Jan 05 10:03:18 2012: DEBUG: EventCallback and DcStatusCallback initialized successfully

Thu Jan 05 10:03:18 2012: DEBUG: Notifier Thread: thread message queue initiated successfully

Thu Jan 05 10:03:18 2012: DEBUG: Notifier thread started successfully

Thu Jan 05 10:03:18 2012: INFO: adding dc: prap with guid: 1325786574-4-436376122

Thu Jan 05 10:03:18 2012: EXCEPTION OCCURED: .\DcMonitor.cpp:373    getDcVersion: Error with ConnectServer for DC: dc name: praprama hostname: praprama domain: username: Administrator password: <hidden>    Error code: 80041064

Thu Jan 05 10:03:18 2012: .\DcMonitor.cpp:373    getDcVersion: Error with ConnectServer for DC: dc name: praprama hostname: praprama domain: username: Administrator password: <hidden>    Error code: 80041064

Thu Jan 05 10:03:18 2012: EXCEPTION OCCURED: .\DcMonitor.cpp:136    Could not find dc version (in addDc) for DC: dc name: praprama hostname: praprama domain: username: Administrator password: <hidden>

Thu Jan 05 10:03:18 2012: ERROR: Failed to register DC: dc name: prap hostname: praprama domain: username: Administrator password: <hidden>. Error returned: .\DcMonitor.cpp:136    Could not find dc version (in addDc) for DC: dc name: praprama hostname: praprama domain: username: Administrator password: <hidden>.  Will wait for next DC list update from configuration server


Checking the DC from the AD Agent box may show the following:


C:\IBF\CLI>adacfg dc list
Name Host/IP      Username      Domain-Name Latest Status
---- ------------ ------------- ----------- -------------
prap praprama Administrator             down



Host name has to be the netbios case sensitive name. If that does not work then add the DC using it FQDN.


So, instead of using this line

C:\IBF\CLI>adacfg dc create -name prap -host praprama -domain -user Administrator -password Cisco123

change the above line to the following:

C:\IBF\CLI>adacfg dc create -name prap -host -domain -user Administrator -password Cisco123

LDAP server test may fail


Ldap server test may fail with the following message:

Hostname# test aaa-server authentication ADPROFILE username xxxxx password xxxxxx

Server IP Address or name:

INFO: Attempting Authentication test to IP address <> (timeout: 12 seconds)

ERROR: Authentication Server not responding: AAA Server has been removed

Captures taken on the ASA "cap capin int inside match tcp any host" may show the following:

indicating strong authentication required - meaning ldap over ssl.



Testing from ASDM may show this error:




adding ldap over ssl in the config will resolve the issue. 

    aaa-server AD1 protocol ldap

    aaa-server AD1 (inside) host

    ldap-over-ssl enable

    server-port 636


AD may not send ip address/logon to the ASA


debugs (debug user-identity ad-agent) may show the following:

idfw_proc[0]: radius query result OK(0), notify caller

idfw_proc[0]: [ADAGENT] radius request STATUS succeeded

idfw_proc[0]: [ADAGENT] domain 'TESTVPN' not configured


ASA config lines show the following:

user-identity domain aaa-server DC01

user-identity default-domain


Change the config lines on the ASA to reflect the "case" that we see in the debugs


user-identity domain TESTVPN aaa-server DC01

user-identity default-domain TESTVPN

Now the debugs show the following:

idfw_adagent[0]: [ADAGENT] processing RADIUS request from

idfw_adagent[0]: [ADAGENT] update <-> TESTVPN\user01 iptype 0 origin

idfw_adagent[0]: [ADAGENT] reply CoA-ACK to


Is there support for LOGOFF events ?

Maykol Rojas
Cisco Employee

Great Doc... I need to lab this up soon...

Mike Rojas.


i have the same problem with the username to IP mapping.

Is the error on the Windows server side??

Cisco konfig looks ok

radius and ldap authentication test are OK, when configure rules i also can browse the ldap ...

Any ideas??


To clear up things -

Is there support for Windows LOGOFF events ?

Why does it not work ?

Kureli Sankar
Cisco Employee

Even though AD-Agent and domains are all active, it is still possible  that the IP addresses' user identities may not be accurate. This is a  constraint of the Windows AD logout mechanism. Windows does not report  logout events to the AD domain controller. In addition, users can just  suspend their computer, de-dock their laptop and move to another  location...etc. All these events cannot be detected, and their IP  addresses, while still valid on both AD-Agent and ASA, may be used by  other users.

To expire the user identity of IP addresses, by default the ASA  removes the user identity from an IP address if there is no activity  from the IP address for 60 minutes based on the following configuration:

   user-identity inactive-user-timer minutes 60

Cristian Popescu


What happens if multiple users are mapped with the same IP (nat-ed clients or different sessions from the same machine)? First allowed user with that IP will open the way for the rest, even if the others don't have access?




Hi Kureli,

We're looking at the identity firewall for our shopfloor/manufacturing environments.  This doc looks great, going to follow this now and test it in the lab.



Arvid Maathuis
Community Member


I have the same question like Cristian. Is the IBF compatible with a terminal server / SBC environment ?

It looks like the ASA can only have 1 ip-to-name binding.





I followed all the steps... n i didnt receive any error also... but when i give this command

NABASA1# sh user-identity user active domain ROBIAN list detail

Total active users: 0    Total IP addresses: 0

  ROBIAN: 0 users, 0 IP addresses

can any one help me?



Community Member


     Great article, excelent detail level. I'm afraid I'm not able to see the "Identity Options" menu nor "User" column in Access Rules.

     Do I have to enable anything to be able to access to Identity Options? I have an ASA 5510 Sec Bundle

Thanks in advance..!


Dear All,

I am still facing this issue........can anyone please help me out ??


Kureli Sankar
Cisco Employee


You probably need to do "debug user-id all" on the ASA and see what it prints.

1. When you login using a PC as this user, does the AD log a message in the security logs about you logging in?

2. Is that messages being sent to the AD Agent? You can enable debug log on Ad-agent and find that out.

3. Is that message getting passed down to the ASA?

IDFW cases take a bit to troubleshoot as there are many moving part involved.  It would be best if you could open a TAC case and work with an engineer.




I did contacted TAC and the issue is now resolved. The issue was mismatch password. ( ASA user account password that we created in DC).



If I am using the ASA as an Anyconnect gateway and the users are authenticated by AD/LDAP on the ASA, do I still need the AD-Agent?

Tarquin Joseph

Hello Kureli,

This article is very useful and well detailed.  I've configured an ASA using the scenario of installing the AD Agent on a separate machine from the DC.  When I test from the ASA I can reach the agent successfully however when I test access to the DC I get a low memory error dialog similar to the one error box in your article.  Does this mean that I have to increase the memory on my the agent server?

Content for Community-Ad