Implementation Guide: FortiProxy Kerberos Authentication
- Matt Sherif

- 14 hours ago
- 5 min read
Configuring Kerberos authentication with your FortiProxy can be a good way improving identity security within your infrastructure. As Kerberos is considerdered more secure method of authentication vs say NTLM.
As a result of working with a customer who wanted to enable Kerberos authentication I wanted to share the process here.
Assumptions:
You have a FortiProxy running version 7.6.x - this may work with earlier versions, however this is the version I used in this artlice
You are running Windows Active Directory Domain Services (AD-DS) with a minimum version of 2019
You are using either STARTLS or LDAPS for secure authentication, this guide uses LDAP over TLS (STARTTLS)
You have configured integrated windows authentication for your browsers of choice, either via GPO or otherwise
Much of what is discussed here overlaps with FortiOS (FortiGate), however the focus of this Implementation Guide is FortiProxy, if you choose to use as a guide for configuration of FortiOS, proceed with caution and at your own risk!
Configuring LDAP Authentication:
Under User & Authentication > LDAP Servers click "Create New" to create a new LDAP server
Fill in the appropriate fields accordingly - feel free to use userPrincipalName instead of sAMAccountName (user@domain vs user)

Test connectivity and User Credentials to ensure you have the correct configuration
Browse to User & Authentication > Domain Controller and click 'Create New'
Fill in the fields according to your organizational settings, note unless you know that a port other than 445 is being used for SMB access to SYSVOL, do not change it:

Click OK
In your Active Directory Domain Services, create a user with "Domain Users" memebership, in our case we're creating fpx
We now need to create a Kerberos Keytab, a keytab is a file that stores long-term secret keys the one or more Kerberos principals, essentially the passwords the FortiProxy will use
To create the keytab we used the following command:
ktpass -princ HTTP/<FQDN_of_Proxy>@DOMAIN.LOCAL -mapuser fpx@ultraviolet.local -pass <password> -crypto all -ptype KRB5_NT_PRINCIPAL -out fpx.keytab
Note the following
The section after the @ MUST BE all CAPS, I spent a lot of time wondering why Kerberos was failing only to realize it was this
You MUST use the FQDN of the proxy, not the IP address
The Domain Suffix is your domain suffix, so if it's acmecorp.com please use ACMECORP.COM
The keytab file should be in the C:\Users\<USERNAME> directory
Browse to User & Authentication > Kerberos, and click 'Create New'
Use the following values in each of the Fields:
Name: Use an appropriate name
Principal: HTTP/<FQDN_of_FortiProxy>@DOMAIN.LOCAL
Use the same principal name you used to create the keytab
LDAP server should be the LDAP server we created in step 2
Click "+Upload" and upload the keytab file we created in step 8
Click OK
This concludes the setup of the Kerberos server setup. We now need to build the Authentication Scheme and Rules, that will then allow us to use the configured Kerberos authentication.
Creating a User Group:
In User & Authentication > User Groups click on "Create New"
In the "New User Group" dialog, set the appropriate settings:
Name: Use a meaningful name
Type: Firewall
Under Remote Groups click "Add"
Remote Server: Select the LDAP server created above
It will populate the domain objects, be sure to browse to the appropriate OU, select the group you wish to map this firewall group to right click, and click "Add Selected"

Click "OK" in the "Add Group Match" dialog
Click "OK in the "New User Group" dialog
Group configuration should look something like this:

Configuring the Authentication Scheme:
Browse to Policy & Objects > Authentication Rules, and in the top right click "Authentication Schemes"
Click "Create New"
In the "Add Authentication Scheme" dialog, configure the settings as follows:
Name: Assign a meaningful name
Method: Negotiate - this will ensure Kerberos is negotiated
Negotiate NTLM: enabled by default, however you can choose to disable this. This fails authentication back to NTLM in the event Kerberos fails. I left mine disabled, ensure whichever choice you make complies with organizational security policy
Kerberos Keytab: the keytab we created in step 9 of the previous section

Click 'OK' to finish creating the Authentication Scheme
Configuring the Authentication Rule:
Browse to Policy & Objects > Authentication Rules, in the top right ensure Authentication Rules are created and click "Create New"
In the "Add new Authentication Rule" dialog, configure the settings as follows:
Name: Assign a meaningful name
Protocol: In this case we will use HTTP - Options are:
FTP
HTTP
Socket Secure (SOCKS)
SSH
ZTNA Portal
Source interface: In this case we will select "any" use the appropriate interface for your implementation
Source Address: the address of the traffic you wish to authenticate
Authentication Scheme: the Scheme we created in the previous section
IP-based authentication: disable
Web Authentication cookies: this can help reduce the number of authentications performed, so we'll enable it. Note, in the event it's greyed out for you like it was for me you can go to the CLI and set web-auth-cookie enable
Add any comments that will help you remember why you created this rule 18 months from now, and click "OK"

Creating a user based firewall rule:
Browse to Policy & Objects > Policy
Click "Create New"
In the "Create New Policy" dialog, configure the following options:
Type: Explicit Web
Name: Use a meaningful name
Web Proxy Explicit: select the appropriate Explicit Web Proxy object you created, we are using the system generated "web-proxy" for this article
Outgoing Interface: we are using port1 in this example, select the appropriate egress interface
Source: the source address you wish this rule to apply to, as well as the source user group
Destination: the destination address or internet service for this rule
Service: webproxy
Application: select the appropriate application or leave blank
URL category: select the appropriate URL category or leave blank
URL risk: select the appropriate URL risk or leave blank
Action: Accept
Security Profiles: Assign security profiles as appropriate
Click "OK"
The resulting policy should look something like this:

Testing the connection:
From the domain joined test workstation we should be able to open a browser and browse normally. In the FortiProxy we should see a user under Dashboard > Firewall User Monitor

Note a few things:
The User name, Workstation IP and user group all show accordingly
The Authentication method used is "Negotiate" which indicates we are using kerberos
If you open a command line window on the test workstation and issue the "klist" command, we should note the following:

The above is a Kerberos Ticket issued to my user account for the FortiProxy. Indicating that Kerberos authentication is indeed working.
Conclusion:
Configuring Kerberos authentication on FortiProxy can be a lengthy process, however it is relatively straight forward. I hope this helps you in the future.
-- Madman Out.



Comments