This section provides an example for configuring AD Single Sign On (SSO) for Internet access users when a FW works as an egress gateway. In this example, no additional program is required. The FW obtains user login information from AD authentication packets.
An enterprise has deployed a FW as the egress gateway to connect the intranet to the Internet, as shown in Figure 1.
The user management and authentication mechanisms of the FW must identify IP addresses on the intranet as users to implement user-specific behavior control and permission assignment. Requirements are as follows:
This example describes only how to configure user management and authentication.
In this mode, the FW cannot obtain user logout messages. Users go offline only when their connections time out.
In the example, both users and user groups on the AD server are imported to the FW. If there are a large number of users on a live network, you can import only user groups and control user permissions by user groups.
The configuration roadmap is as follows:
Set SSO parameters for the FW to listen to authentication results sent from the AD server to PCs.
In this example, authentication packets do not pass through the FW. Therefore, the authentication results must be mirrored to the FW.
Item |
Data |
Description |
|---|---|---|
AD server |
On a FW, set the parameters for communication with an AD server. The parameter settings on the FW must be consistent with those on the AD server. |
|
User information import policy |
Import users from the AD server to the FW. |
|
AD SSO |
Set SSO parameters on the FW and configure the FW to receive the user login information from the AD server. |
<FW> system-view [FW] interface GigabitEthernet 0/0/3 [FW-GigabitEthernet0/0/3] ip address 10.3.0.1 24 [FW-GigabitEthernet0/0/3] quit [FW] interface GigabitEthernet 0/0/4 [FW-GigabitEthernet0/0/4] portswitch [FW-GigabitEthernet0/0/4] port link-type trunk [FW-GigabitEthernet0/0/4] port trunk allow-pass vlan all [FW-GigabitEthernet0/0/4] quit [FW] firewall zone trust [FW-zone-trust] add interface GigabitEthernet 0/0/3 [FW-zone-trust] add interface GigabitEthernet 0/0/4 [FW-zone-trust] quit
GigabitEthernet 0/0/4 is used to receive mirrored packets from the switch and must work in switching mode.
The parameter settings on the FW must be consistent with those on the AD server.
[FW] ad-server template auth_server_ad [FW-ad-auth_server_ad] ad-server authentication 10.3.0.251 88 no-ssl [FW-ad-auth_server_ad] ad-server authentication base-dn dc=cce,dc=com [FW-ad-auth_server_ad] ad-server authentication manager cn=administrator,cn=users Admin@123 [FW-ad-auth_server_ad] ad-server authentication host-name ad.cce.com [FW-ad-auth_server_ad] ad-server authentication ldap-port 389 [FW-ad-auth_server_ad] ad-server user-filter sAMAccountName [FW-ad-auth_server_ad] ad-server group-filter ou
If you are unfamiliar with the AD server and cannot provide the server name or Base DN values, you can use the AD Explorer software downloaded from Internet to connect to the AD server to query the attribute values. The mappings between the server attributes and parameters on the FW are as follows.

Use the user name and password that are configured on the AD server to check the connectivity to the AD server.
[FW-ad-auth_server_ad] test-aaa testname testpassword ad-template auth_server_ad [FW-ad-auth_server_ad] quit
[FW] aaa [FW-aaa] domain cce.com [FW-aaa-domain-cce.com] service-type internetaccess [FW-aaa-domain-cce.com] quit [FW-aaa] quit
[FW] user-manage import-policy policy_import from ad [FW-import-policy_import] server template auth_server_ad [FW-import-policy_import] server basedn dc=cce,dc=com [FW-import-policy_import] server searchdn ou=marketing,dc=cce,dc=com [FW-import-policy_import] server searchdn ou=research,dc=cce,dc=com [FW-import-policy_import] destination-group /cce.com [FW-import-policy_import] import-type user-group [FW-import-policy_import] import-override enable [FW-import-policy_import] sync-mode incremental schedule interval 120 [FW-import-policy_import] quit
If the server has many users or user groups, some users or user groups under the basedn may not be imported to the FW because the number of users or user groups exceeds the FW's specification. Therefore, you are advised to run the command server searchdn to select an import range.
In this example, users and user groups are imported to the FW. The user and user group filtering conditions use the default values (&(|(objectclass=person)(objectclass=organizationalPerson))(cn=*)(!(objectclass=computer))) and (|(objectclass=organizationalUnit)(ou=*)). To change them, run the user-filter and group-filter commands.
[FW] execute user-manage import-policy policy_import
[FW] aaa [FW-aaa] domain cce.com [FW-aaa-domain-cce.com] new-user add-temporary group /cce.com auto-importpolicy_import [FW-aaa-domain-cce.com] quit [FW-aaa] quit
[FW] auth-policy [FW-policy-auth] rule name auth_policy_service [FW-policy-auth-rule-auth_policy_service] source-zone trust [FW-policy-auth-rule-auth_policy_service] source-address 10.3.0.0 24 [FW-policy-auth-rule-auth_policy_service] action exempt-auth [FW-policy-auth-rule-auth_policy_service] quit [FW-policy-auth] quit
If the action of the authentication policy is set to authentication exemption, the FW obtains user information through SSO and permits the traffic when user information fails to be obtained during SSO authentication. If the network has high security requirements, set the action of the authentication policy to portal authentication. Then the FW will implement portal authentication on the users failing the SSO authentication.
To implement SSO when the AD Domain Controller is deployed in the DMZ, ensure that the authentication policy on the FW does not authenticate the authentication packets sent by users to the AD server. You can run the display auth-policy command to check the authentication policy.
In addition, the authentication packets must pass the security check of the security policy. Therefore, the administrator needs to configure the following security policy on the FW:
[FW] user-manage single-sign-on ad [FW-sso-ad] mode no-plug-in [FW-sso-ad] no-plug-in traffic server-ip 10.3.0.251 port 88 [FW-sso-ad] no-plug-in interface GigabitEthernet0/0/4 [FW-sso-ad] enable [FW-sso-ad] quit
If you run the command no-plug-in interface on the FW, the interface parses only AD authentication packets and discards other packets. When both authentication packets and service packets are mirrored by the switch to the FW deployed in bypass mode, do not run this command.
[FW] user-manage online-user aging-time 480
This example uses Huawei S9700 to describe how to configure the port mirroring function. For the configurations of other functions, refer to the product documents of the S9700.
Verify that the following conditions are true:
<FW> display user-manage online-user verbose
Current Total Number: 1
--------------------------------------------------------------------------------
IP Address: 10.3.0.2
Login Time: 2015-01-21 14:58:36 Online Time: 00:00:49
State: Active TTL: 00:30:00 Left Time: 00:29:59
Access Type: local
Authentication Mode: Single Sign-on
Access Device Type: unknown
<--packets: 0 bytes: 0 -->packets: 0 bytes: 0
Build ID: 0
User Name: user_0001@cce.com Parent User Group: /cce.com/research
--------------------------------------------------------------------------------
# sysname FW # user-manage online-user aging-time 480 user-manage single-sign-on ad mode no-plug-in no-plug-in interface GigabitEthernet0/0/4 no-plug-in traffic server-ip 10.3.0.251 port 88 enable # ad-server template auth_server_ad ad-server authentication 10.3.0.251 88 no-ssl ad-server authentication base-dn dc=cce,dc=com ad-server authentication manager cn=administrator,cn=users %$%$M#._~J4QrR[kJu7PUMtHUqh_%$%$ ad-server authentication host-name ad.cce.com ad-server authentication ldap-port 389 ad-server user-filter sAMAccountName ad-server group-filter ou # security-policy rule name local_policy_ad_01 source-zone local destination-zone trust destination-address 10.3.0.251 32 action permit rule name local_policy_ad_02 source-zone trust destination-zone local source-address 10.3.0.251 32 action permit rule name policy_sec_02 source-zone trust source-address 10.3.0.0 24 destination-zone untrust action permit rule name policy_sec_03 source-zone trust source-address 10.3.0.0 24 destination-zone dmz action permit # auth-policy rule name auth_policy_service source-zone trust source-address 10.3.0.0 24 action exempt-auth # interface GigabitEthernet0/0/1 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/2 ip address 10.2.0.1 255.255.255.0 # interface GigabitEthernet0/0/3 ip address 10.3.0.1 255.255.255.0 # interface GigabitEthernet0/0/4 portswitch port link-type trunk port trunk allow-pass vlan 2 to 4094 # firewall zone trust add interface GigabitEthernet0/0/3 add interface GigabitEthernet0/0/4 # firewall zone untrust add interface GigabitEthernet0/0/1 # firewall zone dmz add interface GigabitEthernet0/0/2 # user-manage import-policy policy_import from ad server template auth_server_ad server basedn dc=cce,dc=com server searchdn ou=marketing,dc=cce,dc=com server searchdn ou=research,dc=cce,dc=com destination-group /cce.com user-attribute sAMAccountName user-filter (&(|(objectclass=person)(objectclass=organizationalPerson))(cn=*)(!(objectclass=computer))) group-filter (|(objectclass=organizationalUnit)(ou=*)) import-type user-group import-override enable sync-mode incremental schedule interval 120 # aaa domain cce.com service-type internetaccess new-user add-temporary group /cce.com auto-importpolicy_import # The following configuration is used to perform a one-time operation and not stored in the configuration profile. execute user-manage import-policy policy_import test-aaa testname testpassword ad-template auth_server_ad