LAB 04 Firewall Authentication
LAB 04 Firewall Authentication
LAB 04 Firewall Authentication
Sumário
Lab 4: Firewall Authentication .................................................................................................................... 3
Objectives ............................................................................................................................................. 3
Exercise 1: Configuring an LDAP Server .................................................................................................... 4
Configure an LDAP Server on FortiGate................................................................................................. 4
Assign an LDAP User Group to a Firewall Group .................................................................................... 6
Add the Remote User Group to the Firewall Policy ................................................................................. 8
To add the remote user group to the firewall policy ................................................................................ 8
To test whether aduser1 can successfully authenticate ......................................................................... 9
To monitor active authenticated users ................................................................................................ 10
Remove the User Group From the Firewall Policy................................................................................. 11
Exercise 2: Configuring a RADIUS Server on FortiGate ............................................................................. 12
Configure a RADIUS Server on FortiGate ............................................................................................. 12
Assign a RADIUS User Group to a Firewall Group ................................................................................. 13
To assign a user to a user group.......................................................................................................... 13
Add the Training User Group to the Firewall Policy ............................................................................... 15
To test whether the radius1 user can successfully authenticate ........................................................... 15
Authenticate and Monitor the Authentication ...................................................................................... 16
To monitor active authenticated users ................................................................................................ 16
Remove the User Group From the Firewall Policy................................................................................. 17
2
Lab 4: Firewall Authentication
In this lab, you will examine how to configure FortiGate to communicate with remote LDAP and RADIUS servers
for server-based password authentication.
Objectives
• Configure server-based password authentication with an LDAP server
Time to Complete
Estimated: 35 minutes
3
Exercise 1: Configuring an LDAP Server
In this exercise, you will examine how to configure an LDAP server on FortiGate for remote authentication,
create a remote authentication group for remote users, and then add that group as a source in a firewall policy.
Finally, you will authenticate as one of the remote users, and then monitor the login as the administrator.
2. Click User & Authentication > LDAP Servers, and then click Create New.
Field Value
Name External_Server
Username uid=adadmin,cn=Users,dc=trainingAD,dc=training,dc=lab
4
Field Value
Password Training!
You should see a message indicating that the connection was successful.
5. Click OK.
5
Assign an LDAP User Group to a Firewall Group
You will assign an LDAP user group (AD_users) that includes two users (aduser1 and aduser2) to a firewall user
group, called Remote-users, on FortiGate. By doing this, you will be able to configure firewall policies to act on
the firewall user group.
Usually, groups are used to more effectively manage individuals who have a shared relationship.
The Remote-users firewall group is preconfigured for you. However, you must
modify it to add the users from the remote LDAP server you configured in the
previous procedure.
If you require assistance, or to verify your work, use the step-by-step instructions
that follow.
After you have completed this exercise, see Configuring an LDAP Server on page
1.
1. On the Local-FortiGate GUI, click User & Authentication > User Groups, and then edit the Remote-
users group.
2. In the Remote Groups table, click Add to add users from the remote LDAP server.
6
The Add Group Match window opens.
4. On the Groups tab, right-click AD_users, and then click Add Selected.
AD_users has a green check mark beside it, which indicates that it was added.
5. Click OK.
The users in this Active Directory group are now included in the FortiGate Remote-users firewall user group.
Only users from the remote LDAP server that match this user group entry can authenticate.
6. Click OK.
7
Add the Remote User Group to the Firewall Policy
Now that you have added the LDAP server to the Remote-users firewall user group, you can add the group to a
firewall policy. This allows you to control access to network resources, because policy decisions are made for
the group as a whole.
Field Value
3. In the Security Profiles section, enable Web Filter, and then select Category_Monitor.
This web filter was preconfigured and is set to block the following categories: Potentially Liable, Adult/Mature
Content, and Security Risk.
4. In the Logging Options section, ensure Log Allowed Traffic is enabled, and then select All Sessions.
5. Click OK.
8
To test whether aduser1 can successfully authenticate
1. On the Local-FortiGate CLI, log in with the username admin and password password.
diagnose test authserver ldap <LDAP server name> <LDAP user name> <password>
Where:
• <password> is Training!
A message like the following example should appear to indicate that authentication was successful:
You will authenticate through the firewall policy as aduser1. This user is a member of the Remote-users group
on FortiGate. Then, you will monitor the authentication.
1. On the Local-Client VM, open a new browser tab, and then go to elite-hackers.com.
This URL is set to be blocked by the web filter security profile you enabled in the firewall policy.
Notice that the blocked page displays a replacement message that includes useful information, such as
the URL and Category.
9
To monitor active authenticated users
1. Return to the browser tab where you are logged in to the Local-FortiGate GUI as admin.
2. Click Dashboard > Assets&Identities, and then click Firewall Users to expand it to full screen to view
this login authentication and monitor the firewall authenticated user.
You will see aduser1 listed along with other information, such as User Group and IP Address.
The config user setting CLI command determines how long a user can remain
authenticated. However, you can choose to manually revoke a user
authentication by selecting the user in the Firewall User Monitor list, and then
clicking Deauthenticate. After the user is deauthenticated, the user disappears
from the list, because it is reserved for active users only.
This deauthenticates the user. The user must log in again to access the resources that the firewall policy
protects.
10
Remove the User Group From the Firewall Policy
You will remove the user group assigned to the firewall policy for authentication.
11
Exercise 2: Configuring a RADIUS Server on FortiGate
In this exercise, you will examine how to configure a RADIUS server on FortiGate for remote authentication,
create a remote authentication group for remote users, and then add that group as a source in a firewall policy.
Finally, you will authenticate as one of the remote users, and then monitor the login as the administrator.
2. Click User & Authentication > RADIUS Servers, and then click Create New.
Field Value
Name RADIUS_Server
Authentication Default
method
Secret Training1!
You should see a message indicating that the connection was successful.
5. Click OK.
12
Assign a RADIUS User Group to a Firewall Group
You will assign a RADIUS user group (Training) that includes a user (radius1) to a firewall user group,
called Training, on FortiGate. By doing this, you will be able to configure firewall policies to act on the firewall
user group.
Usually, groups are used to more effectively manage individuals who have a shared relationship.
The Training firewall group is preconfigured for you. However, you must modify it
to add the users from the remote RADIUS server you configured in the previous
procedure.
If you require assistance, or to verify your work, use the step-by-step instructions
that follow.
After you have completed this exercise, see Configuring a RADIUS Server on
FortiGate on page 1.
2. In the Training table, click Add to add users from the remote RADIUS server.
13
3. In the Remote Server field, select RADIUS_Server.
4. In the Groups field, select Specify, and then type the group name Training.
5. Click OK.
The user in this RADIUS server group is now included in the FortiGate Training firewall user group. Only users
from the remote RADIUS server that match this user group entry can authenticate.
The remote RADIUS server is configured with using the RADIUS attribute value
pair (AVP) 26, known as a vendor-specific attribute (VSA). This attribute allows
the Fortinet-Group-Name VSA to be included in the RADIUS response. In
FortiOS, the user group must be configured to specifically match this group.
6. Click OK.
14
Add the Training User Group to the Firewall Policy
Now that you have added the RADIUS server to the Training firewall user group, you can add the group to a
firewall policy. This allows you to control access to network resources, because policy decisions are made for
the group as a whole.
Field Value
3. Click OK.
diagnose test authserver radius <RADIUS server name> mschap2 <RADIUS user name> <password>
Where:
• <password> is Training!
A message like the following example should appear to indicate that authentication was successful:
15
Authenticate and Monitor the Authentication
You will authenticate through the firewall policy as radius1. This user is a member of the Training group on
FortiGate. Then, you will monitor the authentication.
This URL is set to be blocked by the web filter security profile you enabled in the firewall policy.
Notice that the blocked page displays a replacement message that includes useful information, such as
the URL and Category.
2. Click Dashboard > Assets&Identities, and then click Firewall Users to expand it to full screen to view
this login authentication and monitor the firewall authenticated user.
You will see the user radius1 listed along with other information, such as User Group and IP Address.
16
The config user setting CLI command determines how long a user can remain
authenticated. However, you can choose to manually revoke a user
authentication by selecting the user in the Firewall User Monitor list, and then
clicking Deauthenticate. After the user is deauthenticated, the user disappears
from the list, because it is reserved for active users only.
This deauthenticates the user. The user must log in again to access the resources that the firewall policy
protects.