FortiOS 7.0.0 New - Features - Guide 360 499
FortiOS 7.0.0 New - Features - Guide 360 499
This section includes information about policy and object related new features:
l Zero Trust Network Access on page 360
l NGFW on page 476
l Policies on page 479
l Objects on page 499
Zero Trust Network Access (ZTNA) is an access control method that uses client device identification, authentication, and
Zero Trust tags to provide role-based application access. It gives administrators the flexibility to manage network access
for On-net local users and Off-net remote users. Access to applications is granted only after device verification,
authenticating the user’s identity, authorizing the user, and then performing context based posture checks using Zero
Trust tags.
Traditionally, a user and a device have different sets of rules for on-net access and off-net VPN access to company
resources. With a distributed workforce and access that spans company networks, data centers, and cloud, managing
the rules can become complex. User experience is also affected when multiple VPNs are needed to get to various
resources.
When On-net and Off-net FortiClient endpoints register to FortiClient EMS, device information, log on user information,
and security posture are all shared over ZTNA telemetry with the EMS server. Clients also make a certificate signing
request to obtain a client certificate from the EMS that is acting as the ZTNA Certificate Authority (CA).
Based on the client information, EMS applies matching Zero Trust tagging rules to tag the clients. These tags, and the
client certificate information, are synchronized with the FortiGate in real-time. This allows the FortiGate to verify the
client's identity using the client certificate, and grant access based on the ZTNA tags applied in the ZTNA rule.
For more information, see Establish device identity and trust context with FortiClient EMS on page 371.
Access proxy
The FortiGate access proxy can proxy HTTP and TCP traffic over secure HTTPS connections with the client. This
enables seamless access from the client to the protected servers, without needing to form IPsec or SSL VPN tunnels.
The FortiGate HTTPS access proxy works as a reverse proxy for the HTTP server. When a client connects to a webpage
hosted by the protected server, the address resolves to the FortiGate’s access proxy VIP. The FortiGate proxies the
connection and takes steps to authenticate the user. It prompts the user for their certificate on the browser, and verifies
this against the ZTNA endpoint record that is synchronized from the EMS. If an authentication scheme, such as SAML
authentication, is configured, the client is redirected to a captive portal for sign-on. If this passes, traffic is allowed based
on the ZTNA rules, and the FortiGate returns the webpage to the client.
For example configurations, see ZTNA HTTPS access proxy example on page 377, ZTNA HTTPS access proxy with
basic authentication example on page 386, and ZTNA proxy access with SAML authentication example on page 395.
TCP forwarding access proxy works as a special type of HTTPS reverse proxy. Instead of proxying traffic to a web
server, TCP traffic is tunneled between the client and the access proxy over HTTPS, and forwarded to the protected
resource. The FortiClient endpoint configures the ZTNA connection by pointing to the proxy gateway, and then
specifying the destination host that it wants to reach. An HTTPS connection is made to the FortiGate’s access proxy VIP,
where the client certificate is verified and access is granted based on the ZTNA rules. TCP traffic is forwarded from the
FortiGate to the protected resource, and an end to end connection is established.
For an example configuration, see ZTNA TCP forwarding access proxy example on page 392.
The basic that are require to configure full ZTNA on the FortiGate are:
1. FortiClient EMS fabric connector and ZTNA tags.
2. FortiClient EMS running version 7.0.0 or later.
To configure ZTNA in the GUI, go to System > Feature Visibility and enable Zero Trust
Network Access.
ZTNA tags
After the FortiGate connects to the FortiClient EMS, it automatically synchronizes ZTNA tags.
1. Go to Policy & Objects > ZTNA and select the ZTNA Tags tab.
2. Hover the cursor over a tag name to view more information about the tag, such as its resolved addresses.
1. Go to Policy & Objects > ZTNA and select the ZTNA Tags tab.
2. Click Create New Group.
3. Enter a name for the group and select the group members.
4. Click OK.
To configure a ZTNA server, define the access proxy VIP and the real servers that clients will connect to. The access
proxy VIP is the FortiGate ZTNA gateway that clients make HTTPS connections to. The service/server mappings define
the virtual host matching rules and the real server mappings of the HTTPS requests.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Enter a name for the server.
4. Select an external interface, enter the external IP address, and select the external port that the clients will connect
to.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
l Specify: Enter the name or IP address of the host that the request must match. For example, if
www.example1.com is entered as the host, then only requests to www.example1.com will match.
c. Configure the path as needed.
The path can be matched by substring, wildcard, or regular expression. For example, if the virtual host is
specified as www.example1.com, and the path substring is map1, then www.example1/map1 will be matched.
d. Add a server:
i. In the Servers table, click Create New.
ii. Enter the server IP address and port number.
iii. Set the server status.
iv. Click OK.
v. Add more servers as needed.
e. Click OK.
f. Add more server mappings as needed.
7. Click OK.
next
end
The load balance method for the real servers can only be specified in the CLI.
A ZTNA rule is a proxy policy used to enforce access control. ZTNA tags or tag groups can be defined to enforce zero
trust role based access. Security profiles can be configured to protect this traffic.
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Click Create New.
3. Enter a name for the rule.
4. Add the ZTNA tags or tag groups that are allowed access.
5. Select the ZTNA server.
The firewall policy matches and redirects client requests to the access proxy VIP. The source interface and addresses
that are allowed access to the VIP can be defined. By default, the destination is any interface, so once a policy is
configured for full ZTNA, the policy list will be organized by sequence.
UTM processing of the traffic happens at the ZTNA rule.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Enter a name for the policy.
3. Enable ZTNA and select Full ZTNA.
Optional authentication
To configure authentication to the access proxy, you must configure an authentication scheme and authentication rule in
the CLI. They are used to authenticate proxy-based policies, similar to configuring authentication for explicit and
transparent proxy.
The authentication scheme defines the method of authentication that is applied. For ZTNA, basic HTTP and SAML
methods are supported. Each method has additional settings to define the data source to check against. For example,
with basic HTTP authentication, a user database can reference an LDAP server, RADIUS server, local database, or
other supported authentication servers that the user is authenticated against.
The authentication rule defines the proxy sources and destinations that require authentication, and which authentication
scheme to apply. For ZTNA, active authentication method is supported. The active authentication method references a
scheme where users are actively prompted for authentication, like with basic authentication.
After the authentication rule triggers the method to authenticate the user, a successful authentication returns the groups
that the user belongs to. In the ZTNA rule and proxy policy you can define a user or user group as the allowed source.
Only users that match that user or group are allowed through the proxy policy.
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Edit an existing rule, or click Create New to create a new rule.
3. Click in the Source field, select the User tab, and select the users and user groups that will be allowed access.
4. Configure the remaining settings as required.
5. Click OK.
The authentication rule and scheme defines the method used to authenticate users. With basic HTTP authentication, a
sign in prompt is shown after the client certificate prompt. After the authentication passes, the returned groups that the
user is a member of are checked against the user groups that are defined in the ZTNA rule. If a group matches, then the
user is allowed access after passing a posture check.
For more information, see ZTNA HTTPS access proxy with basic authentication example on page 386 and ZTNA proxy
access with SAML authentication example on page 395.
How device identity is established through client certificates, and how device trust context is established between
FortiClient, FortiClient EMS, and the FortiGate, are integral to ZTNA.
Device roles
FortiClient
FortiClient endpoints provide the following information to FortiClient EMS when they register to the EMS:
l Device information (network details, operating system, model, and others)
l Logged on user information
l Security posture (On-net/Off-net, antivirus software, vulnerability status, and others)
It also requests and obtains a client device certificate from the EMS ZTNA Certificate Authority (CA) on its first attempt to
connect to the access proxy. The client uses this certificate to identify itself to the FortiGate.
FortiClient EMS
FortiClient EMS issues and signs the client certificate with the FortiClient UID, certificate serial number, and EMS serial
number. The certificate is then synchronized to the FortiGate. EMS also shares its EMS ZTNA CA certificate with the
FortiGate, so that the FortiGate can use it to authenticate the clients.
FortiClient EMS uses zero trust tagging rules to tag endpoints based on the information that it has on each endpoint. The
tags are also shared with the FortiGate.
FortiGate
The FortiGate maintains a continuous connection to the EMS server to synchronize endpoint device information,
including primarily:
l FortiClient UID
l Client certificate SN
l EMS SN
l Device credentials (user/domain)
l Network details (IP and MAC address and routing to the FortiGate)
When a device's information changes, such as when a client moves from on-net to off-net, or their security posture
changes, EMS is updated with the new device information and then updates the FortiGate. The FortiGate's WAD
daemon can use this information when processing ZTNA traffic.
FortiClient EMS has a default_ZTNARootCA certificate generated by default that the ZTNA CA uses to sign CSRs from
the FortiClient endpoints. Clicking the refresh button revokes and updates the root CA, forcing updates to the FortiGate
and FortiClient endpoints by generating new certificates for each client.
Do not confuse the EMS CA certificate (ZTNA) with the SSL certificate. The latter is the server
certificate that is used by EMS for HTTPS access and fabric connectivity to the EMS server.
EMS can also manage individual client certificates. To revoke the current client certificate that is used by the endpoint:
go to Endpoint > All Endpoints, select the client, and click Action > Revoke Client Certificate.
In Windows, FortiClient automatically installs certificates into the certificate store. The certificate information in the store,
such as certificate UID and SN, should match the information on EMS and the FortiGate.
To locate certificates on other operating systems, consult the vendor documentation.
To locate the client certificate and EMS ZTNA CA certificate on a Windows PC:
1. In the Windows search box, enter user certificate and click Manage user certificates from the results.
2. In the certificate manager, go to Certificates - Current User > Personal > Certificates and find the certificate that is
issued by the FortiClient EMS.
The following diagnose commands help to verify the presence of matching endpoint record, and information such as the
client UID, client certificate SN, and EMS certificate SN on the FortiGate. If any of the information is missing or
incomplete, client certificate authentication might fail because the corresponding endpoint entry is not found. More in-
depth diagnosis would be needed to determine the reason for the missing records.
Command Description
# diagnose endpoint Show the endpoint record list. Optionally, filter by the endpoint IP address.
record list <ip>
# diagnose endpoint wad- Query endpoints by client UID.
comm find-by uid
<uid>
# diagnose endpoint wad- Query endpoints by the client IP-VDOM pair.
comm find-by ip-vdom
<ip> <vdom>
# diagnose wad dev query- Query from WAD diagnose command by UID.
by uid <uid>
# diagnose wad dev query- Query from WAD diagnose command by IP address.
by ipv4 <ip>
# diagnose test Check the FortiClient NAC daemon ZTNA and route cache.
application fcnacd 7
# diagnose test
application fcnacd 8
A client certificate is obtained when an endpoint registers to EMS. FortiClient automatically submits a CSR request and
the FortiClient EMS signs and returns the client certificate. This certificate is stored in the operating system's certificate
store for subsequent connections. The endpoint information is synchronized between the FortiGate and FortiClient EMS.
When an endpoint disconnects or is unregistered from EMS, its certificate is removed from the certificate store and
revoked on EMS. The endpoint obtains a certificate again when it reconnected the EMS.
By default, client certificate authentication is enabled on the access proxy, so when the HTTPS request is received the
FortiGate's WAD process challenges the client to identify itself with its certificate. The FortiGate makes a decision based
on the following possibilities:
1. If the client responds with the correct certificate that the client UID and certificate SN can be extracted from:
l If the client UID and certificate SN match the record on the FortiGate, the client is allowed to continue with the
ZTNA proxy rule processing.
l If the client UID and certificate SN do not match the record on the FortiGate, the client is blocked from further
ZTNA proxy rule processing.
2. If the client cancels and responds with an empty client certificate:
l If empty-cert-action is set to accept, the client is allowed to continue with ZTNA proxy rule processing.
l If empty-cert-action is set to block, the client is blocked from further ZTNA proxy rule processing.
Example
In this example, a client connects to qa.fortinet.com and is prompted for a client certificate.
l client-cert is set to enable, and empty-cert-action is set to block.
l The ZTNA server is configured, and a ZTNA rule is set to allow this client.
l The domain resolves to the FortiGate access proxy VIP.
Scenario 1:
When prompted for the client certificate, the client clicks OK and provides a valid certificate that is verified by the
FortiGate.
Result:
The client passes SSL certificate authentication and is allowed to access the website.
Scenario 2:
When prompted for the client certificate, the client clicks Cancel, resulting in an empty certificate response to the access
proxy.
Result:
Because the certificate response is empty and empty-cert-action is set to block, the WAD daemon blocks the
connection.
Currently, the Microsoft Edge and Google Chrome browsers are supported by ZTNA.
In this example, an HTTPS access proxy is configured to demonstrate its function as a reverse proxy on behalf of the
web server it is protecting. It verifies user identity, device identity, and trust context, before granting access to the
protected source.
This example shows access control that allows or denies traffic based on ZTNA tags. Traffic is allowed when the
FortiClient endpoint is tagged as Low risk, and denied when the endpoint is tagged with Malicious-File-Detected.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
To configure ZTNA in the GUI, go to System > Feature Visibility and enable Zero Trust
Network Access.
6. Click Save.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Set Name to WIN2K16-P1.
e. Click OK.
7. Click OK.
To configure ZTNA rules to allow and deny traffic based on ZTNA tags in the GUI:
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Create a rule to deny traffic:
a. Click Create New again to create another rule.
b. Set Name to ZTNA-Deny-malicious.
c. Add the ZTNA tag Malicious-File-Detected.
This tag is dynamically retrieved from EMS when you first created the Zero Trust Tagging Rule.
d. Select the ZTNA server WIN2K16-P1.
e. Set Action to DENY.
f. Enable Log Violation Traffic.
g. Click OK.
3. Create a rule to allow traffic:
a. Click Create New.
b. Set Name to proxy-WIN2K16-P1.
c. Add the ZTNA tag Low.
d. Select the ZTNA server WIN2K16-P1.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set Name to ZTNA-P1.
3. Enable ZTNA and select Full ZTNA.
4. Set Incoming Interface to port1.
5. Set ZTNA Server to WIN2K16-P1.
6. Configure the remaining settings as needed.
UTM processing of the traffic happens at the ZTNA rule.
7. Click OK.
After FortiClient EMS and FortiGate are configured, the HTTPS access proxy remote connection can be tested.
Access allowed:
The certificate is in the User Configuration store, under Personal > Certificates. The details show the SN of the
certificate, which matches the record on the FortiClient EMS and the FortiGate.
Access denied:
1. On the remote Windows PC, trigger the Zero Trust Tagging Rule by creating the file in C:\virus.txt.
2. Open a browser and enter the address http://winserver.fgdocs.com:8443.
3. The client is verified by the FortiGate to authenticate your identity.
4. FortiGate checks your security posture. Because EMS has tagged the PC with the Malicious-File-Detected tag, it
matches the ZTNA-Deny-malicious rule.
5. You are denied access to the web server.
Access allowed:
Access denied:
This example expands on the previous example (ZTNA HTTPS access proxy example on page 377), adding LDAP
authentication to the ZTNA rule. Users are allowed based on passing the client certificate authentication check, user
authentication, and security posture check.
Users that are in the AD security group ALLOWED-VPN are allowed access to the access proxy. Users that are not part
of this security group are not allowed access.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
LDAP/Active Directory Users and Groups:
l Domain: KLHOME.local
l Users (Groups):
l radCurtis (Domain Users, ALLOWED-VPN)
l radKeith (Domain Users)
1. Go to User & Authentication > LDAP Servers and click Create New.
2. Configure the following settings:
Name WIN2K16-KLHOME-LDAPS
Server identity check Optionally, enable to verify the domain name or IP address against the server
certificate.
To configure a remote user group from the LDAP server in the GUI:
1. Go to User & Authentication > User Groups and click Create New.
2. Set the name to KLHOME-ALLOWED-VPN.
3. Set Type to Firewall.
4. In the Remote Groups table click Add:
a. Set Remote Server to WIN2K16-KLHOME-LDAPS.
b. Locate the ALLOWED-VPN group, right-click on it, and click Add Selected.
c. Click OK.
5. Click OK.
To configure a remote user group from the LDAP server in the CLI:
After the LDAP server and user group have been configured, an authentication scheme and rule must be configured.
To configure authentication schemes and rules in the GUI, go to System > Feature Visibility
and enable Explicit Proxy.
Authentication scheme
The authentication scheme defines the method of authentication that is applied. In this example, basic HTTP
authentication is used so that users are prompted for a username and password the first time that they connect to a
website through the HTTPS access proxy.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Scheme.
2. Set the name to ZTNA-Auth-scheme.
3. Set Method to Basic.
4. Set User database to Other and select WIN2K16-KLHOME-LDAPS as the LDAP server.
5. Click OK.
Authentication rule
The authentication rule defines the proxy sources and destination that require authentication, and what authentication
scheme is applied. In this example, active authentication through the basic HTTP prompt is used and applied to all
sources.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Rule.
2. Set the name to ZTNA-Auth-rule.
3. Set Source Address to all.
4. Set Protocol to HTTP.
5. Enable Authentication Scheme and select ZTNA-Auth-scheme.
6. Click OK.
A user or user group must be applied to the ZTNA rule that you need to control user access to. The authenticated user
from the authentication scheme and rule must match the user or user group in the ZTNA rule.
In this example, the user group is applied to the two ZTNA rules that were configured in ZTNA HTTPS access proxy
example on page 377.
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Edit the ZTNA-Deny-malicious rule.
3. Click in the Source field, select the User tab, select the KLHOME-ALLOWED-VPN group, then click Close.
4. Click OK.
5. Edit the proxy-WIN2K16-P1 rule.
6. Click in the Source field, select the User tab, select the KLHOME-ALLOWED-VPN group, then click Close.
7. Click OK.
Testing remote access to the HTTPS access proxy with user authentication
1. On a remote Windows PC, open the FortiClient app, select the Zero Trust Telemetry tab, and confirm that you are
connected to the EMS server.
2. In a browser, enter the address of the server and the access port.
If entering an FQDN, make sure that DNS can resolve the address to the IP address of the FortiGate. In this
example, winserver.fgdocs.com resolves to 192.168.2.86.
3. When the browser asks for the client certificate to use, select the EMS signed certificate, then click OK.
The client certificate is verified by the FortiGate to authenticate your identity.
4. When prompted, enter the username radCurtis and the password, and click Sign in.
As radCurtis is a member of the ALLOWED-VPN group in Active Directory, it will match the KLHOME-ALLOWED-
VPN user group. After the user authentication passes, the FortiGate performs a posture check on the ZTNA group.
When that passes, you are allowed access to the website.
10.10.10.20, radCurtis
type: fw, id: 0, duration: 13, idled: 13
expire: 587, allow-idle: 600
packets: in 0 out 0, bytes: in 0 out 0
group_id: 8 16777220
group_name: KLHOME-ALLOWED-VPN grp_16777220
# diagnose test application fcnacd 7
ZTNA Cache:
-uid F4F3263AEBE54777A6509A8FCCDF9284: { "tags": [ "all_registered_clients", "Low" ], "user_
name": "keith", "client_cert_sn": "6C7433E8E2CEDEB49B6C3C3C03677A3521EA4486", "ems_sn":
"FCTEMS0000109188" }
The user_name is the windows log in username learned by FortiClient. It might not match the
username used in firewall user authentication.
1. If scenario 1 has just been tested, log in to the FortiGate and deauthenticate the user:
a. Go to Dashboard > Users & Devices and expand the Firewall Users widget.
b. Right-click on the user radCurtis and select deauthenticate.
2. On a remote Windows PC, open the FortiClient app, select the Zero Trust Telemetry tab, and confirm that you are
connected to the EMS server.
3. In a browser, enter the address winserver.fgdocs.com.
4. When the browser asks for the client certificate to use, select the EMS signed certificate, then click OK. This option
might not appear if you have already selected the certificate when testing scenario 1.
The client certificate is verified by the FortiGate to authenticate your identity.
5. When prompted, enter the username radKeith and the password, and click Sign in.
As radKeith is not a member of the ALLOWED-VPN group in Active Directory, it will not match the KLHOME-
ALLOWED-VPN user group. Because no other policies are matched, this user is implicitly denied
Go to Dashboard > Users & Devices, expand the Firewall Users widget, and confirm that user radKeith is listed, but no
applicable user group is returned.
# execute log display
In this example, a TCP forwarding access proxy (TFAP) is configured to demonstrate an HTTPS reverse proxy that
forwards TCP traffic to the designated resource. The access proxy tunnels TCP traffic between the client and the
FortiGate over HTTPS, and forwards the TCP traffic to the protected resource. It verifies user identity, device identity,
and trust context, before granting access to the protected source.
RDP access is configured to one server, and SSH access to the other.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
next
end
The mapped port (mappedport) restricts the mapping to the specified port or port range. If mappedport is not
specified, then any port will be matched.
5. Click Create.
6. Create a second rule with the following settings:
l Rule Name: RDP_winserver
l Destination Host: 10.88.0.1:3389
After creating the ZTNA connection rules, you can SSH and RDP directly to the server IP address and port.
Logs
RDP:
SSH:
In this example, an HTTPS access proxy is configured, and SAML authentication is applied to authenticate the client.
The FortiGate acts as the SAML SP and a SAML authenticator serves as the IdP. In addition to verifying the user and
device identity with the client certificate, the user is also authorized based on user credentials to establish a trust context
before granting access to the protected resource.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
To configure an LDAP server and an LDAP server group to verify user groups:
set dn "dc=myqalab,dc=local"
set type regular
set username "cn=fosqa1,cn=users,dc=myqalab,dc=local"
set password **********
set group-search-base "dc=myqalab,dc=local"
next
end
config user group
edit "ldap-group-saml"
set member "ldap-10.1.100.198"
next
end
To configure the authentication settings, rule, and scheme to match the new SAML server:
1. On a client PC, try to access the webpage through the HTTPS access proxy. For example, go to
http://172.18.62.32:7831 in a browser.
2. The client PC is prompted for a client certificate. After the certificate is validated, you are redirected to a SAML log in
portal.
3. Enter your user credentials. The SAML server authenticates and sends a SAML assertion response message to the
FortiGate.
4. The FortiGate queries the LDAP server for the user group, and then verifies the user group against the groups or
groups defined in the proxy policy.
5. The user is proxied to the webpage on the real web server.
Use the following command to check the user information after the user has been authenticated:
# diagnose wad user list
ID: 7, VDOM: vdom1, IPv4: 10.1.100.143
user name : [email protected]
worker : 0
duration : 124
auth_type : Session
auth_method : SAML
pol_id : 6
g_id : 13
user_based : 0
expire : no
LAN:
bytes_in=25953 bytes_out=14158
WAN:
bytes_in=8828 bytes_out=6830
Event log:
Traffic log:
In this example, firewall policies in ZTNA IP/MAC filtering mode are configured that use ZTNA tags to control access
between on-net devices and an internal web server. This mode does not require the use of the access proxy, and only
uses ZTNA tags for access control. Traffic is passed when the FortiClient endpoint is tagged as Low risk only. Traffic is
denied when the FortiClient endpoint is tagged with Malicious-File-Detected.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
To configure ZTNA in the GUI, go to System > Feature Visibility and enable Zero Trust
Network Access.
6. Click Save.
To configure a firewall policy in ZTNA IP/MAC filtering mode to block access in the GUI:
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set Name to block-internal-malicious-access.
3. Enable ZTNA and select IP/MAC filtering.
4. Set ZTNA Tag to Malicious-File-Detected.
5. Set Incoming Interface to default.35.
6. Set Outgoing Interface to port3.
7. Set Source and Destination to all.
8. Set Service to ALL.
9. Set Action to DENY.
10. Enable Log Violation Traffic.
11. Configuring the remaining settings as needed.
12. Click OK.
To configure a firewall policy in ZTNA IP/MAC filtering mode to allow access in the GUI:
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set Name to allow-internal-access.
3. Enable ZTNA and select IP/MAC filtering.
To configure a firewall policies in ZTNA IP/MAC filtering mode to block and allow access in the CLI:
Testing the access to the web server from the on-net client endpoint
Access allowed:
internal-access firewall policy, and you are allowed access to the web server.
Access denied:
1. On the remote Windows PC, trigger the Zero Trust Tagging Rule by creating the file in C:\virus.txt.
2. Open a browser and enter the address of the server.
3. FortiGate checks your security posture. Because EMS has tagged the PC with the Malicious-File-Detected tag, it
matches the block-internal-malicious-access firewall policy.
4. You are denied access to the web server.
Access allowed:
FCTEMS0000109188_Low: ID(78)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Malicious-File-Detected: ID(190)
…
# diagnose test application fcnacd 7
ZTNA Cache:
-uid F4F3263AEBE54777A6509A8FCCDF9284: { "tags": [ "all_registered_clients", "Low" ], "user_
name": "keithli", "client_cert_sn": "563DA313367608678A3633E93C574F6F8BCB4A95", "gateway_
route_list": [ { "gateway_info": { "fgt_sn": "FGVM04TM21000144", "interface": "default.35",
"vdom": "root" }, "route_info": [ { "ip": "192.168.40.8", "mac": "24-b6-fd-fa-54-c1",
"route_type": "direct" } ] } ], "ems_sn": "FCTEMS0000109188" }
# execute log display
49 logs found.
10 logs returned.
3.5% of logs has been searched.
38: date=2021-03-28 time=23:07:38 eventtime=1616998058790134389 tz="-0700"
logid="0000000013" type="traffic" subtype="forward" level="notice" vd="root"
srcip=192.168.40.8 srcname="Fortinet-KeithL" srcport=51056 srcintf="default.35"
Access denied:
TCP forwarding access proxy supports communication between the client and the access proxy without SSL/TLS
encryption. The connection still begins with a TLS handshake. The client uses the HTTP 101 response to switch
protocols and remove the HTTPS stack. Further end to end communication between the client and server are
encapsulated in the specified TCP port, but not encrypted by the access proxy. This improves performance by reducing
the overhead of encrypting an already secured underlying protocol, such as RDP, SSH, or FTPS. Users should still
enable the encryption option for end to end protocols that are insecure.
In this example, the encryption option to access the web server on HTTP/8080 is disabled to show that traffic for an
insecure connection protocol can be viewed in plain text in a protocol analyzer (such as Wireshark). In a real life
application, the encryption option should be used for an insecure protocol.
The mapped port (mappedport) is not specified so that it will map any ports that are defined in FortiClient’s ZTNA
connection rule.
After creating the ZTNA connection rule, open a browser and access the web page at http://10.88.0.1:8080.
2. Use the following WAD debugs to can capture the details about the connection as seen by the FortiGate WAD
daemon. Notice that the HTTP request has tls=0, indicating that the proxy connection between the client and access
proxy is not encrypted.
# diagnose wad debug enable category all
# diagnose wad debug enable level verbose
# diagnose debug enable
[I][p:224][s:46086][r:16777237] wad_dump_http_request :2542
hreq=0x7f20bdaf5950 Received request from client: 10.0.3.2:62067
3. On the client PC, perform a packet capture to review the traffic flow between the client (10.0.3.2) and the access
proxy (10.0.3.11) in detail. While the traffic is encapsulated in port 443, the underlying HTTP/8080 requests and
Traffic stream:
set ip 2000:172:16:200::209
next
end
next
end
next
end
1. On an IPv6 client, ensure that the address qa6.test.com resolves to the IPv6 VIP address of 2000:172:18:62::66.
2. In a browser, connect to https://qa6.test.com:6443.
3. After device certificate verification, the browser will open up the webpage on the IPv6 real server.
4. In the Forward Traffic Log, the following log is available:
3: date=2021-06-25 time=13:38:18 eventtime=1624653498459580215 tz="-0700"
logid="0000000024" type="traffic" subtype="forward" level="notice" vd="root"
srcip=2000:10:1:100::214 srcport=55957 srcintf="port2" srcintfrole="undefined"
dstcountry="Reserved" srccountry="Reserved" dstip=2000:172:16:200::209 dstport=443
dstintf="root" dstintfrole="undefined" sessionid=92406 service="HTTPS" proto=6
1. On an IPv6 client, ensure that the address qa6.test.com resolves to the IPv6 VIP address of 2000:172:18:62::66.
2. In a browser, connect to https://qa6.test.com:6443.
3. After device certificate verification, the browser will open up the webpage on the IPv4 real server.
4. In the Forward Traffic Log, the following log is available:
2: date=2021-06-25 time=13:46:54 eventtime=1624654014129553521 tz="-0700"
logid="0000000024" type="traffic" subtype="forward" level="notice" vd="root"
srcip=2000:10:1:100::214 srcport=60530 srcintf="port2" srcintfrole="undefined"
dstcountry="Reserved" srccountry="Reserved" dstip=172.16.200.209 dstport=443
dstintf="root" dstintfrole="undefined" sessionid=219 service="HTTPS" proto=6
action="accept" policyid=1 policytype="proxy-policy" poluuid="7afdac8c-d5db-51eb-dfc6-
67bb86e4bdcf" policyname="ztna_rule" duration=5 wanin=2028 rcvdbyte=2028 wanout=1321
lanin=1236 sentbyte=1236 lanout=947 appcat="unscanned" utmaction="allow" countweb=1
utmref=65443-14
1. On an IPv4 client, ensure that the address qa6.test.com resolves to the IPv4 VIP address of 172.18.62.66.
2. In a browser, connect to https://qa6.test.com:6443.
3. After device certificate verification, the browser will open up the webpage on the IPv6 real server.
4. In the Forward Traffic Log, the following log is available:
1: date=2021-06-25 time=13:52:30 eventtime=1624654350689576485 tz="-0700"
logid="0000000024" type="traffic" subtype="forward" level="notice" vd="root"
srcip=10.1.100.206 srcport=53492 srcintf="port2" srcintfrole="undefined"
dstcountry="Reserved" srccountry="Reserved" dstip=2000:172:16:200::209 dstport=443
dstintf="root" dstintfrole="undefined" sessionid=726 service="HTTPS" proto=6
action="accept" policyid=1 policytype="proxy-policy" poluuid="7afdac8c-d5db-51eb-dfc6-
67bb86e4bdcf" policyname="ztna_rule" duration=0 wanin=1901 rcvdbyte=1901 wanout=736
lanin=569 sentbyte=569 lanout=3040 appcat="unscanned" utmaction="allow" countweb=1
utmref=65443-28
ZTNA can be configured with SSH access proxy to provide a seamless SSH connection to the server.
Advantages of using an SSH access proxy instead of a TCP forwarding access proxy include:
l Establishing device trust context with user identity and device identity checks.
l Applying SSH deep inspection to the traffic through the SSH related profile.
l Performing optional SSH host-key validation of the server.
l Using one-time user authentication to authenticate the ZTNA SSH access proxy connection and the SSH server
connection.
To act as a reverse proxy for the SSH server, the FortiGate must perform SSH host-key validation to verify the identity of
the SSH server. The FortiGate does this by storing the public key of the SSH server in its SSH host-key configurations.
When a connection is made to the SSH server, if the public key matches one that is used by the server, then the
connection is established. If there is no match, then the connection fails.
SSH access proxy allows user authentication to occur between the client and the access proxy, while using the same
user credentials to authenticate with the SSH server. The following illustrates how this works:
1. The remote endpoint registers to FortiClient EMS and receives the client certificate.
2. The remote endpoint tries to connect to the SSH access proxy. It must use the same username that is later used for
access proxy authentication.
3. The FortiGate challenges the endpoint with device identity validation.
4. The remote endpoint provides the EMS issued certificate for device identification.
5. The FortiGate challenges the endpoint with user authentication. For example, this could be done with basic or
SAML authentication.
6. The users enters their credentials on the remote endpoint.
7. The FortiGate authenticates the user and collects the username.
8. Using the FortiGate's CA or the customer's CA certificate, the FortiGate signs an SSH certificate and embeds the
username in its principal.
9. The FortiGate attempts to connect to the SSH server using the certificate authentication.
10. The SSH server verifies the authenticity of the certificate, and matches the username principal against its
authorized_keys file.
11. If the username matches a record in the file, then the SSH connection is established. If no match is found, then the
SSH connection fails.
Example
In this example, an SSH connection is established using SSH access proxy with host-key validation and one-time
authentication.
l The SSH server is a Linux based server that uses sshd to provide remote access
l For SSH host-key validation, the public key of the SSH server has been imported into the FortiGate.
l For one-time authentication using certificate authentication:
l The SSH server must allow certificate authentication.
l The SSH server must have the proper entry in its authorized_keys file that contains the user principal and the
FortiGate CA's public key.
l The entry is present in the user directory corresponding to the user that is trying to log in.
b. Choose the publish key file based on the hash type (in this case, ECDSA), and show it's content:
$ cat /etc/ssh/ssh_host_ecdsa_key.pub
ecdsa-sha2-nistp256 AAAAE2*********IpEik=
3. On the Linux server, enable the SSH service to use the authorized_keys file:
a. Locate and edit the /etc/ssh/sshd_config file.
b. Ensure that the AuthorizedKeysFile line is uncommented, for example:
AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
4. Allow remote SSH log in with certificate authentication and principal name:
a. Log in to the SSH server using the account that will be granted remote SSH access (in this example: radCurtis):
b. Locate the account's authorized_keys file in the ~/.ssh directory:
$ ls -la ~/.ssh
total 12
d. Create an entry containing the following keywords and add them to the authorized_keys file:
echo 'cert-authority,principals="radCurtis" ssh-rsa AAAAB3**********JLXlxj3' >>
authorized_keys
Where:
l cert-authority - indicates that this entry is used in certificate authentication by validating the
certificate using the public key provided in this entry.
l principals="radCurtis" - indicates the user that must match with the username embedded in the
SSH certificate.
l ssh-rsa AAAAB3**********JLXlxj3 - indicates the FortiGate CA’s public key that is used to validate
the SSH certificate.
5. Restart the sshd service:
$ sudo systemctl stop sshd
$ sudo systemctl start sshd
The SSH server can now accept SSH connection from radCurtis@<server IP>, where the SSH certificate used by
the FortiGate to log in contains radCurtis embedded as a principal.
When a user connects from a SSH client using <username>@<server IP>, sshd will locate the
authorized_keys file in the directory /home/<username>/.ssh/authorized_keys. If the
authorized_keys is not in that directory, authentication will fail on the SSH server side.
If you suspect that authentication is failing on the SSH server, use the following commands to
manually start sshd in debug mode to troubleshoot:
$ sudo systemctl stop sshd
$ /usr/sbin/sshd -ddd -p 22
1. Configure a new VIP to allow access to the SSH access proxy over 192.168.2.87:443:
config firewall vip
edit "ZTNA_SSH"
set type access-proxy
set extip 192.168.2.87
set extintf "any"
set server-type https
set extport 443
set ssl-certificate "Fortinet_CA_SSL"
next
end
3. Configure the host-key that will be used to authenticate the SSH server. The public-key was retrieved when pre-
configure the Linux SSH server (step 1b).
config firewall ssh host-key
edit "ecdsa"
set type ECDSA
set usage access-proxy
set public-key "AAAAE2**********IpEik="
next
end
6. Configure the RADIUS setting, user setting, and user group to apply user authentication to the access proxy
connection using RADIUS:
config user radius
edit "Win2k16-Radius"
set server "192.168.20.6"
8. Configure the ZTNA rule to allow traffic to the SSH server, and apply user authentication, posture check, and a
security profile where necessary:
config firewall proxy-policy
edit 5
set name "SSH-proxy"
set proxy access-proxy
set access-proxy "ZTNA_SSH"
set srcaddr "all"
set dstaddr "all"
set ztna-ems-tag "FCTEMS8821001056_ems138_av_tag"
set action accept
set schedule "always"
set groups "radius_group"
set utm-status enable
set ssl-ssh-profile "custom-deep-inspection"
next
end
9. Configure the firewall policy to allow the client connection to the SSH access proxy over the VIP:
config firewall policy
edit 35
set name "full-ztna-ssh"
set srcintf "port1"
set dstintf "any"
1. On the remote client, open FortiClient, go to the Zero Trust Telemetry tab, and make sure that it is connected to the
EMS server.
2. Go to the ZTNA Connection Rules tab and click Add Rule.
3. Configure the rule, then click Create:
Mode Transparent
When Encryption is disabled, the connection between the client and FortiGate access proxy is not encapsulated in
HTTPS after the client and FortiGate connection is established. This allows for less overhead, because SSH is
already a secure connection. This option is available in FortiClient 7.0.1 and later releases.
4. Open an SSH client, such as PuTTy, and make an SSH connection to [email protected] on port 22.
5. After device authentication is performed and passes in the background, FortiClient prompts the user to sign in.
Enter the username, radCurtis, and password, then click Sign in.
After successful user authentication, the SSH connection is established without an additional log in.
7. The successful connection is logged in the forward traffic logs after the SSH connection has disconnected:
# execute log display
25 logs found.
10 logs returned.
ZTNA can be used to replace VPN based teleworking solutions. Teleworking configurations that use SSL VPN tunnel or
web portal mode access with LDAP user authentication can be migrated to ZTNA with HTTPS access proxy.
Scenarios
Remote users that are in the ALLOWED-VPN active directory group have access to a specific web server when they
connect through the SSL VPN tunnel. The FortiGate enables split tunneling to the web server so that only traffic to that
destination is routed through the tunnel. The web server hosts internal websites that are only accessible by employees.
Remote users that are in the ALLOWED-VPN active directory group have access to a specific web server when they
connect through the SSL VPN web portal. The FortiGate The web server hosts internal websites that are only accessible
by employees. The pre-defined bookmark to the internal website is the only site that allows remote access.
Configuration
next
end
config vpn ssl settings
set servercert "Fortinet_Factory"
set tunnel-ip-pools "SSLVPN_TUNNEL_ADDR1"
set tunnel-ipv6-pools "SSLVPN_TUNNEL_IPv6_ADDR1"
set source-interface "port1"
set source-address "all"
set source-address6 "all"
set default-portal "no-access"
config authentication-rule
edit 1
set groups "KLHOME-ALLOWED-VPN"
set portal "web-access"
next
end
end
With both the SSL VVPN tunnel and web portals, the remote user can connect through the SSL VPN and access the
website at https://192.168.20.6. To monitor their access, go to Dashboard > Network and expand the SSL-VPN widget.
Both the SSL VPN tunnel and web portals can be migrated into a ZTNA configuration using the same LDAP server and
user group for authentication. The ZTNA solution provides multi-factor authentication using the client certificate, and
additional security posture checks.
Instead of connecting to the SSL VPN tunnel or web portal, the remote user connects to the HTTPS access proxy that
forwards traffic to the web server after authentication and security posture checks are completed. This provides granular
control over who can access the web resource using role-based access control. It also gives the user transparent access
to the website using only their browser.
For more information, see ZTNA HTTPS access proxy example on page 377 and ZTNA HTTPS access proxy with basic
authentication example on page 386.
Command Description
# diagnose endpoint fctems test- Verify FortiGate to FortiClient EMS connectivity.
connectivity <EMS>
# execute fctems verify <EMS> Verify the FortiClient EMS’s certificate.
# diagnose test application fcnacd 2 Dump the EMS connectivity information.
# diagnose debug app fcnacd -1 Run real-time FortiClient NAC daemon debugs.
# diagnose debug enable
# diagnose endpoint record list <ip> Show the endpoint record list. Optionally, filter by the endpoint
IP address.
# diagnose endpoint wad-comm find-by Query endpoints by client UID.
uid <uid>
# diagnose endpoint wad-comm find-by Query endpoints by the client IP-VDOM pair.
ip-vdom <ip> <vdom>
# diagnose wad dev query-by uid <uid> Query from WAD diagnose command by UID.
# diagnose wad dev query-by ipv4 <ip> Query from WAD diagnose command by IP address.
# diagnose firewall dynamic list List EMS ZTNA tags and all dynamic IP and MAC addresses.
# diagnose test application fcnacd 7 Check the FortiClient NAC daemon ZTNA and route cache.
# diagnose test application fcnacd 8
# diagnose wad debug enable category Run real-time WAD debugs.
all
# diagnose wad debug enable level
verbose
# diagnose debug enable
# diagnose debug reset Reset debugs when completed
The WAD daemon handles proxy related processing. The FortiClient NAC daemon (fcnacd)
handles FortiGate to EMS connectivity.
2. If fcnacd does not report the proper status, run real-time fcnacd debugs:
# diag debug app fcnacd -1
# diag debug enable
6. List all the dynamic ZTNA IP and MAC addresses learned from EMS:
# diagnose firewall dynamic list
List all dynamic addresses:
FCTEMS0000109188_all_registered_clients: ID(51)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Low: ID(78)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Malicious-File-Detected: ID(190)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
8. Troubleshoot WAD with real-time debugs to understand how the proxy handled a client request:
# diagnose wad debug enable category all
# diagnose wad debug enable level verbose
# diagnose debug enable
len=0
[p:29957][s:458767][r:1] wad_vs_proxy_match_gwy(2244): 6:WIN2K16-P1: matching gwy with
vhost(_def_virtual_host_)
[p:29957][s:458767][r:1] wad_vs_proxy_match_vhost(2293): 6:WIN2K16-P1: matching vhost
by: 192.168.2.86
[p:29957][s:458767][r:1] wad_vs_matcher_map_find(477): Empty matcher!
[p:29957][s:458767][r:1] wad_vs_proxy_match_vhost(2296): 6:WIN2K16-P1: no host matched.
[p:29957][s:458767][r:1] wad_vs_proxy_match_gwy(2263): 6:WIN2K16-P1: matching gwy by (/)
with vhost(_def_virtual_host_).
[p:29957][s:458767][r:1] wad_pattern_matcher_search(1210): pattern-match succ:/
[p:29957][s:458767][r:1] wad_vs_proxy_match_gwy(2271): 6:WIN2K16-P1: Matched gwy(1) type
(https).
[p:29957][s:458767][r:1] wad_http_vs_check_dst_ovrd(776): 6:WIN2K16-P1:1: Found server:
192.168.20.6:443
[p:29957][s:458767][r:1] wad_http_req_exec_act(9296): dst_addr_type=3 wc_nontp=0 sec_
web=1 web_cache=0 req_bypass=0
[p:29957][s:458767][r:1] wad_http_req_check_policy(8117): starting policy matching(vs_
pol= 1):10.10.10.20:56312->192.168.20.6:443
[p:29957][s:458767][r:1] wad_fw_addr_match_ap(1524): matching ap:WIN2K16(7) with vip
addr:WIN2K16-P1(10)
[p:29957][s:458767][r:1] wad_fw_addr_match_ap(1524): matching ap:WIN2K16-P1(10) with vip
addr:WIN2K16-P1(10)
[p:29957][s:458767][r:1] wad_http_req_policy_set(6811): match pid=29957 policy-id=2 vd=0
in_if=3, out_if=7 10.10.10.20:56312 -> 192.168.20.6:443
[p:29957][s:458767][r:1] wad_cifs_profile_init(93): CIFS Profile 0x7fbd7a5bf200 [] of
type 0 created
[p:29957][s:458767][r:1] wad_http_req_proc_policy(6622): web_cache(http/https=0/0, fwd_
srv=<nil>.
[p:29957][s:458767][r:1] wad_auth_inc_user_count(1668): increased user count,
quota:128000, n_shared_user:2, vd_used: 2, vd_max: 0, vd_gurantee: 0
[p:29957][s:458767][r:1] __wad_fmem_open(563): fmem=0xaaee3e8, fmem_name='cmem 336
bucket', elm_sz=336, block_sz=73728, overhead=20, type=advanced
[p:29957][s:458767][r:1] __wad_hauth_user_node_hold(2107): wad_hauth_user_node_alloc
(1568): holding node 0x7fbd76d48060
mapping user_node:0x7fbd76d48060, user_ip:0x7fbd7a57b408(0), user:0x7fbd7a5cf420(0)
[p:29957][s:458767][r:1] __wad_hauth_user_node_hold(2107): wad_user_node_stats_hold
(483): holding node 0x7fbd76d48060
[p:29957][s:458767][r:1] __wad_hauth_user_node_hold(2107): wad_http_session_upd_user_
node (4813): holding node 0x7fbd76d48060
[p:29957][s:458767][r:1] wad_http_req_proc_policy(6698): policy result:vf_id=0:0 sec_
profile=0x7fbd7a5bef00 set_cookie=0
[p:29957][s:458767][r:1] wad_http_urlfilter_check(381): uri_norm=1 inval_host=0 inval_
url=0 scan-hdr/body=1/0 url local=0 block=0 user-cat=0 allow=0 ftgd=0 keyword=0 wisp=0
[p:29957][s:458767][r:1] wad_http_req_proc_waf(1309): req=0x7fbd7a46bb60 ssl.deep_scan=1
proto=10 exempt=0 waf=(nil) body_len=0 ua=Chrome/89.0.4389.90 skip_scan=0
[p:29957][s:458767][r:1] wad_http_req_proc_antiphish(5376): Processing antiphish request
[p:29957][s:458767][r:1] wad_http_req_proc_antiphish(5379): No profile
[p:29957][s:458767][r:1] wad_http_connect_server(4696): http session 0x7fbd7a532ac8
req=0x7fbd7a46bb60
[p:29957][s:458767][r:1] wad_http_srv_still_good(4575): srv((nil)) nontp(0) dst_type(3)
req: dst:192.168.20.6:443, proto:10)
hcs: dst:N/A:0, proto:1)
The ZTNA log subtype is added to UTM logs and a traffic log ID is added for ZTNA related traffic.
There are six events that generate logs in the subtype:
1. Received an empty client certificate
2. Received a client certificate that fails to validate
3. API gateway cannot be matched
4. None of the real servers can be reached
5. ZTNA rule (proxy policy) cannot be matched
6. HTTPS SNI virtual host does not match the HTTP host header
ZTNA related traffic will generate logs when logging all allowed traffic is enabled in the policy.
Log samples
A client PC (10.1.100.206) is connected to port2 on the FortiGate. The FortiGate is also connected to a FortiClient EMS,
and a real server that is defined in the ZTNA server API gateway.
l Access proxy server: zs2
l Access proxy VIP: zv2
l Access proxy VIP external IP address: 172.18.62.112
l Mapped real server IP address: 172.18.60.65
UTM and traffic log samples for each of the six event types:
UTM log:
1: date=2021-06-09 time=16:36:54 eventtime=1623281814371409480 tz="-0700"
logid="2100060500" type="utm" subtype="ztna" eventtype="ztna-clt-cert" level="warning"
vd="root" msg="Client sends an empty certificate" policyid=5 sessionid=21453
srcip=10.1.100.206 dstip=172.18.62.112 srcport=56494 dstport=443 srcintf="port2"
srcintfrole="undefined" dstintf="root" dstintfrole="undefined" proto=6 action="blocked"
service="HTTPS" vip="zv2" accessproxy="zs2"
UTM log:
1: date=2021-06-09 time=15:06:47 eventtime=1623276407372009447 tz="-0700"
logid="2100060501" type="utm" subtype="ztna" eventtype="ztna-clt-cert" level="warning"
vd="root" msg="Client certificate has security problem" policyid=5 sessionid=16810
srcip=10.1.100.206 dstip=172.18.62.112 srcport=55910 dstport=443 srcintf="port2"
srcintfrole="undefined" dstintf="root" dstintfrole="undefined" proto=6 action="blocked"
service="HTTPS" vip="zv2" accessproxy="zs2" desc="cert auth failed, cert-
cn:qa.wangd.com, cert-issuer:qa.wangd.com, cert-status:failure "
UTM log:
2: date=2021-06-09 time=15:15:39 eventtime=1623276939601849940 tz="-0700"
logid="2102060522" type="utm" subtype="ztna" eventtype="ztna-error" level="warning"
vd="root" msg="Unable to match an API-gateway" policyid=5 sessionid=17152
srcip=10.1.100.206 dstip=172.18.62.112 srcport=55974 dstport=443 srcintf="port2"
srcintfrole="undefined" dstintf="root" dstintfrole="undefined" proto=6 action="blocked"
service="HTTPS" vip="zv2" accessproxy="zs2" desc="HTTP url
(https://qbcd.test.com/test123456) failed to match an API-gateway with vhost
(name/hostname:_def_virtual_host_/_def_virtual_host_)"
UTM log:
2: date=2021-06-09 time=15:17:49 eventtime=1623277069371490614 tz="-0700"
logid="2102060522" type="utm" subtype="ztna" eventtype="ztna-error" level="warning"
vd="root" msg="Unable to match an API-gateway" policyid=5 sessionid=17233
srcip=10.1.100.206 dstip=172.18.62.112 srcport=55988 dstport=443 srcintf="port2"
srcintfrole="undefined" dstintf="root" dstintfrole="undefined" proto=6 action="blocked"
service="HTTPS" vip="zv2" accessproxy="zs2" desc="HTTP url
(https://qbcd.test.com/test123456) failed to match an API-gateway with vhost
(name/hostname:_def_virtual_host_/_def_virtual_host_)"
UTM log:
2: date=2021-06-09 time=15:20:20 eventtime=1623277220133105204 tz="-0700"
logid="2101060510" type="utm" subtype="ztna" eventtype="ztna-policy-match"
6. HTTPS SNI virtual host does not match the HTTP host header:
Traffic log:
1: date=2021-06-09 time=15:24:25 eventtime=1623277465275004842 tz="-0700"
logid="0000000013" type="traffic" subtype="forward" level="notice" vd="root"
srcip=10.1.100.206 srcport=56040 srcintf="port2" srcintfrole="undefined"
dstip=172.18.62.112 dstport=443 dstintf="root" dstintfrole="undefined"
srccountry="Reserved" dstcountry="Reserved" sessionid=17614 proto=6 action="deny"
policyid=5 policytype="policy" poluuid="b4d4c466-8b64-51eb-2292-5defbb0e34e5"
policyname="ztna" service="HTTPS" trandisp="noop" duration=0 sentbyte=0 rcvdbyte=0
sentpkt=0 rcvdpkt=0 appcat="unscanned" utmaction="block" countztna=2 msg="Denied: failed
to match an API-gateway" utmref=65486-0
UTM log:
2: date=2021-06-09 time=15:24:25 eventtime=1623277465275003194 tz="-0700"
logid="2102060522" type="utm" subtype="ztna" eventtype="ztna-error" level="warning"
vd="root" msg="Unable to match an API-gateway" policyid=5 sessionid=17614
srcip=10.1.100.206 dstip=172.18.62.112 srcport=56040 dstport=443 srcintf="port2"
srcintfrole="undefined" dstintf="root" dstintfrole="undefined" proto=6 action="blocked"
service="HTTPS" vip="zv2" accessproxy="zs2" desc="HTTP url (https://aq4.test.com/)
failed to match an API-gateway with vhost(name/hostname:_def_virtual_host_/_def_virtual_
host_)"
When specifying ZTNA tags in a rule, logical AND can be used for tag matching.
When editing a ZTNA rule:
l If Match ZTNA Tags is set to All the client must match all of the tags (logical AND).
l If Match ZTNA Tags is set to Any the client can match any of the tags (logical OR).
In these examples, there are two PCs with FortiClient: PC120 at 10.1.100.120 and PC117 at 10.1.100.117. There are
two ZTNA EMS tags: ems138_av_tag and ems138_running_app_tag. PC120 has both of them, and PC117 only has
one.
It is assumed that ZTNA has already been configured. For information, see Zero Trust Network Access in the FortiOS
Administration Guide.
To configure a ZTNA rule that requires both ZTNA EMS tags in the GUI:
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab, and click Create New.
2. Configure the rule, adding both ZTNA EMS tags to ZTNA Tag, and setting Match ZTNA Tags to All.
3. Click OK.
To configure a ZTNA rule that requires both ZTNA EMS tags in the CLI:
Entry #2:
- UID: 083078C718674C72B7C8CA0C09EB99C7
- Domain:
- User: frank_117
- Owner:
- Certificate SN: 03CBD682154035C5E5FEA27F83DFC8F7398CDC60
- EMS SN: FCTEMS8821001056
- online: true
- Routes (2):
-- Route #0: IP=10.1.100.117, vfid=0
- Tags (4):
-- Tag (#0): Low
-- Tag (#1): all_registered_clients
-- Tag (#2): ems138_av_tag
-- Tag (#3): ems138_management_tag
lls_idx_mask = 0x00000001,
- UID: 5721ED0374564878BFA1725C5555CEBA
- Domain: fortios.local131
- User: tester1
- Owner:
- Certificate SN: 48EC63DCF1234D41AEE2B4301017F74893FC291A
- EMS SN: FCTEMS8821001056
- online: true
- Routes (2):
-- Route #0: IP=10.1.100.120, vfid=0
- Tags (6):
-- Tag (#0): ems138_running_app_tag
-- Tag (#1): all_registered_clients
-- Tag (#2): ems138_av_tag
-- Tag (#3): ems138_vulnerability_tag
-- Tag (#4): ems138_management_tag
Logical OR example
To configure a ZTNA rule that requires one of the ZTNA EMS tags in the GUI:
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab, and click Create New.
2. Configure the rule, adding both ZTNA EMS tags to ZTNA Tag, and setting Match ZTNA Tags to Any.
3. Click OK.
To configure a ZTNA rule that requires one of the ZTNA EMS tags in the CLI:
The firewall policy to forward traffic to the access proxy VIP is implicitly generated based on the ZTNA rule configuration,
and does not need to be manually created.
To configure a ZTNA access proxy in the GUI, create the ZTNA server and then use the server in a ZTNA rule. Rules
must include a source interface to indicate where the traffic is sourced from.
When upgrading to FortiOS 7.0.2, the ZTNA rule source interface will be set to any and all full ZTNA firewall policies will
automatically be removed.
To perform IP/MAC filtering with ZTNA tags in a firewall policy, assign tags in the IP/MAC Based Access Control field.
The toggle to select Full ZTNA or IP/MAC filtering is removed.
These examples assume that the FortiGate EMS fabric connector is already successfully connected.
In this example, a ZTNA access proxy is configured for HTTP access to the Web server from a remote endpoint.
1. Go to Policy & Objects > ZTNA, select the ZTNA Servers tab, and click Create New.
2. Set Name to WIN2K16-P1.
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab, and click Create New.
2. Set Name to proxy-WIN2K16-P1.
3. Set Incoming Interface to port1.
4. Set Source to all.
5. In ZTNA Tag add Low
6. In ZTNA Server add WIN2K16-P1.
7. Set Destination to all.
8. Set Action to ACCEPT.
In this example, IP/MAC based access control is configured to allow traffic from an internal subnet when the endpoint is
tagged as Low risk.
To configure a firewall policy to use IP/MAC based access control in the GUI:
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set Name to allow-internal-access.
3. Set Incoming Interface to default.35.
4. Set Outgoing Interface to port3.
5. Set Source to all.
6. In IP/MAC Based Access Control add the ZTNA tag Low.
7. Set Destination to all.
8. Set Service to ALL.
9. Set Action to ACCEPT.
10. Enable Log Allowed Traffic and set it to All Sessions.
To configure a firewall policy to use IP/MAC based access control in the CLI:
To test the access to the web server from the on-net client endpoint:
Endpoint posture changes trigger active ZTNA proxy sessions to be re-verified and terminated if the endpoint is no
longer compliant with the ZTNA policy.
The FortiGate monitors changes to the endpoint tags that are updated by EMS with the fcnacd process. When a change
is detected, the endpoint's active ZTNA sessions must match the ZTNA policy again before data can pass.
Changes to the ZTNA policy, such as changing the ZTNA tag matching logic, will also trigger re-verification of the client
device against the policy.
The remote endpoint accesses the RDP server through the TCP forwarding access proxy. The proxy is managed by the
FortiClient EMS server, which has a ZTNA tagging rule that assigns the AV-enabled tag to endpoints that have Windows
antivirus enabled, and the Low risk host tag to endpoints that are low risk.
These examples assume that the FortiGate EMS fabric connector has already connected successfully, and a ZTNA
server named WIN2K16-P1-RDP that forwards traffic to the RDP server has been configured.
In this example, a ZTNA rule is configured to allow access for endpoints that have the AV-enabled tag. After an RDP
sessions is established, Windows antivirus is disabled on the remote endpoint. The FortiGate re-verifies the session and
the active RDP session is removed from the FortiGate session table, causing the RDP session to be disconnected.
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab, and click Create New.
2. Set Name to TCP-forward-WIN2K16.
3. Set Incoming Interface to port1.
4. Set Source to all.
5. In ZTNA Tag add AV-enabled
6. In ZTNA Server add WIN2K16-P1-RDP.
7. Set Destination to all.
8. Set Action to ACCEPT.
9. Configure the remaining options as needed.
10. Click OK.
Encryption Disabled
c. Click Create.
4. Ensure that the endpoint has Windows antivirus enabled.
5. Open an RDP session to connect to the RDP server at 192.168.20.6.
6. After a successful connection, on the FortiGate:
a. The endpoint is detected and marked with the AV-enabled tag:
# diagnose test application fcnacd 7
-
UID: F4F3263AEBE54777A6509A8FCCDF9284
-
Domain:
-
User: keithli
-
Owner:
-
Certificate SN: 1626C2C10E6AD97D71FA9E2D9C314C1F5C03D68B
-
EMS SN: FCTEMS0000109188
-
online: true
-
Tags (3):
-- Tag (#0): AV-enabled
-- Tag (#1): all_registered_clients
-- Tag (#2): Low
lls_idx_mask = 0x00000001,
b. A session is created:
- UID: F4F3263AEBE54777A6509A8FCCDF9284
- Domain:
- User: keithli
- Owner:
-
Certificate SN: 1626C2C10E6AD97D71FA9E2D9C314C1F5C03D68B
-
EMS SN: FCTEMS0000109188
-
online: true
-
Tags (2):
-- Tag (#0): all_registered_clients
-- Tag (#1): Low
lls_idx_mask = 0x00000001,
In this example, a ZTNA rule is configured to allow access to endpoints that have at least one of the AV-enabled or Low
ZTNA tags. A remote user who has Windows antivirus disabled, but is low risk, successfully establishes an RDP session
over the ZTNA access proxy. An administrator changes the ZTNA rule's tag matching logic from Any to All, causing the
RDP session to be disconnected.
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab.
2. Edit the TCP-forward-WIN2K16 rule.
3. In ZTNA Tag, add Low.
-
UID: F4F3263AEBE54777A6509A8FCCDF9284
-
Domain:
-
User: keithli
-
Owner:
-
Certificate SN: 1626C2C10E6AD97D71FA9E2D9C314C1F5C03D68B
-
EMS SN: FCTEMS0000109188
-
online: true
-
Tags (2):
-- Tag (#0): all_registered_clients
-- Tag (#1): Low
lls_idx_mask = 0x00000001,
b. A session is created:
# diagnose sys session filter dst 192.168.2.86
# diagnose sys session filter src 10.10.10.25
# diagnose sys session list
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/0
state=log local may_dirty f24
statistic(bytes/packets/allow_err): org=54763/299/1 reply=90223/313/1 tuples=2
tx speed(Bps/kbps): 1860/14 rx speed(Bps/kbps): 3064/24
orgin->sink: org pre->in, reply out->post dev=3->7/7->3 gwy=192.168.2.86/0.0.0.0
hook=pre dir=org act=noop 10.10.10.25:55147->192.168.2.86:443(0.0.0.0:0)
hook=post dir=reply act=noop 192.168.2.86:443->10.10.10.25:55147(0.0.0.0:0)
pos/(before,after) 0/(0,0), 0/(0,0)
src_mac=08:5b:0e:ea:7f:d4
misc=7 policy_id=4 pol_uuid_idx=14853 auth_info=0 chk_client_info=0 vd=0
serial=00003255 tos=00/00 app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
When configuring a ZTNA server, load balancing, TCP forwarding, and SAML can be configured in the GUI.
Load balancing
Load balancing can be configured when adding or editing a service or server mapping.
TCP forwarding can be selected as the service when adding or editing a service or server mapping.
Add servers from firewall addresses. Enable Enable Additional SSH Option to configure a client certificate and host key
validation.
A client certificate allows users to perform one-time user authentication to authenticate the SSH access proxy. See
ZTNA SSH access proxy example for details. Select a certificate from the drop-down list, or create a new one.
Host key validation allows the ZTNA proxy to validate the SSH server using the host key before forwarding traffic to it.
Click in the Host key field to add or create an SSH host key.
SAML
SAML can be enabled when configuring a ZTNA server, and a SAML SSO server can be selected or created.
If the SAML SSO server does not have an authentication scheme or rule associated with it, warnings are shown.
The following limits have increased for EMS server, IP addresses, and MAC addresses in EMS and ZTNA tags:
l The maximum number of EMS servers a FortiGate can connect to increased from three to five.
l The maximum number of IP address an EMS tag can resolve increased from 1000 to over 100,000.
l The maximum number of MAC address an EMS tag can resolve increased from 1000 to 3000.
The following diagnose commands are available to verify address information:
# diagnose firewall fqdn <option>
Option Description
list-ip List IP FQDN information.
list-mac List MAC FQDN information.
list-all List FQDN information.
getinfo-ip Get information of IP FQDN address.
getinfo-mac Get information of MAC FQDN address.
get-ip Get and display one IP FQDN address.
get-mac Get and display one MAC FQDN address.
Sample diagnostics
When defining ZTNA connection rules on FortiClient for TCP forwarding, it is sometimes desirable to configure the
destination host address as an FQDN address instead of an IP address. Since the real servers are often servers in the
corporate network, this layer of obfuscation prevents internal IPs from easily leaking to the public, and also makes the
destination more easily recognizable by the end users.
One obstacle to overcome is getting remote hosts to resolve an internal FQDN that is typically only resolvable by an
internal DNS in the corporate network. This can be solved with the following:
1. When an FQDN address is added as a destination host in a ZTNA connection rule, FortiClient creates a virtual IP for
this FQDN address and adds this to the computer’s host file (Windows). The same is true when a ZTNA connection
rule entry is pushed from EMS.
2. The virtual IP mapped to the FQDN address is not the real address of the server. It allows applications to resolve the
FQDN address to this virtual IP. FortiClient listens to any traffic destined for it and forwards the traffic using the TCP
forwarding URL with FQDN to the ZTNA access proxy.
3. The FortiGate access proxy will resolve the FQDN using the internal DNS on the corporate network, matching the
traffic to the ZTNA real server configuration with the same domain and address.
4. If a valid ZTNA real server entry is found, traffic is forwarded to the real server.
Example
In this example, two servers in the internal network are added to the FortiGate access proxy for TCP forwarding. The
remote client configures two ZTNA connection rules, with the destination host field pointing to the FQDN addresses of
the internal servers. These FQDN addresses are configured in the FortiGate’s DNS database so they can be resolved by
the FortiGate. It is recommended to use an internal DNS server for production environments.
This example assumes that the FortiGate EMS Fabric connector is already successfully connected.
This features requires a minimum FortiClient and FortiClient EMS version of 7.0.3.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Set Name to ZTNA_S1.
4. Configure the network settings:
a. Set External interface to any.
b. Set External IP to 172.18.62.32.
c. Set External port to 443.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
6. Add server mapping:
a. In the Service/server mapping table, click Create New.
b. For Service, select TCP Forwarding.
c. Add a server:
i. In the Servers table, click Create New.
ii. Create a new FQDN address for the HTTPS server at s27.qa.fortinet.com, then click OK.
iii. Apply the new address object as the address for the new server.
iv. Click OK.
d. Add another server using the same steps for s29.qa.fortinet.com.
7. Click OK. Now that the ZTNA server is complete, the domain settings must be configured in the CLI to map domains
to the real servers.
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Click Create New.
3. Set Name to ZTNA_TCP.
4. Set Incoming Interface to port2.
5. Set Source to all.
6. Select the ZTNA server ZTNA_S1.
7. Configure the remaining options as needed.
8. Click OK.
d. Click OK.
e. Add another DNS entry using the same steps for the s29.qa.fortinet.com HTTP server.
6. Click OK.
ZTNA TCP forwarding rules can be provisioned from the EMS server. See Provisioning ZTNA
TCP forwarding rules via EMS for more details.
5. The Windows PC now resolves the FQDNs to the virtual IPs, and FortiClient will listen to the traffic to these IPs and
forward them to the TCP access proxy.
6. Have the remote user connect to the HTTPS and HTTP servers on a browser. After device verification, the user is
able to successfully connect to the remote servers.
UTM scanning and deep inspection is supported for multiple protocols in a ZTNA TCP forwarding access proxy. In
addition to HTTP and HTTPS, the mail protocols (SMTP, IMAP, and POP3) and file sharing protocols (SMB and CIFS)
are supported.
Examples
This topology is used in the following four examples. For detailed instructions regarding configuring a TCP forwarding
access proxy (TFAP), ZTNA rules (proxy policy), and ZTNA connection rules (FortiClient), refer to ZTNA TCP forwarding
access proxy example in the FortiOS Administration Guide.
1. In FortiClient, add ZTNA connection rules for the email server IP and POP3, IMAP, and SMTP ports.
2. In FortiOS, configure the ZTNA TCP forwarding server to add the email server address and enable AV profile
scanning in the ZTNA rules.
3. On the client PC, open Outlook app and send emails with attachments containing virus affected files.
4. The ZTNA rule on the FortiGate blocks the email send/receive traffic and generates AV logs.
Sample logs
AV deep scanning for SSL encrypted POP3S, IMAPS, and SMTPS traffic
To configure AV deep scanning for SSL encrypted POP3S, IMAPS, and SMTPS traffic:
1. In FortiClient, add ZTNA connection rules for the email server IP and POP3S, IMAPS, and SMTPS ports.
2. In FortiOS, configure the ZTNA TCP forwarding server to add the email server address and enable AV profile
scanning in the ZTNA rules.
3. On the client PC, open Outlook app and send emails with attachments containing virus affected files.
4. The ZTNA rule on the FortiGate blocks the email send/receive traffic and generates AV logs.
Sample logs
1. In FortiClient, add ZTNA connection rules for the SMB file sharing server IP and ports.
2. In FortiOS, configure the ZTNA TCP forwarding server to add the SMB server address and enable AV profile
scanning in the ZTNA rules.
3. On the client PC, upload and download virus affected files to and from the SMB server.
4. The ZTNA rule on the FortiGate blocks the email send/receive traffic and generates AV logs.
Sample logs
1. In FortiClient, add ZTNA connection rules for the CIFS server IP and port.
2. In FortiOS, configure the ZTNA TCP forwarding server to add the CIFA server address and enable file filter profile
scanning in the ZTNA rules.
3. On the client PC, upload and download predefined file types (such as .EXE) to and from the CIFS server.
4. The ZTNA rule on the FortiGate blocks the email send/receive traffic and generates AV logs.
Sample logs
SSL VPN web portals can be defined in ZTNA access proxy settings. The ZTNA access proxy handles the access
control processes (client certificate authentication, posture check, user authentication and authorization), and
establishes the HTTPS connection between the end user and the access proxy. Then, it forwards the user to the web
portal where they can use predefined bookmarks to access TCP based services like HTTPS, RDP, VNC, FTP, SFTP,
SSH, Telnet, and SMB. Existing SSL VPN portal configurations can be used.
Example
In this example, a remote client connects to the ZTNA access proxy and completes the client certificate check. If
successful, the remaining access control procedures are automatically completed, and the user is forwarded to the web
portal. The web portal is configured with predefined bookmarks that connect to internal servers and external websites.
The user can access any resource that is defined in the bookmarks to create an end-to-end connection.
1. Configure a VIP for the ZTNA access proxy. The ssl-certificate can be replaced with a server certificate:
config firewall vip
edit "ztna_webportal"
set type access-proxy
set extip 172.18.62.68
set extintf "any"
set server-type https
set extport 4443
set ssl-certificate "*.test.com"
next
end
2. Configure the virtual host to be used to connect to the ZTNA access proxy. The host should resolve to the VIP’s
address:
config firewall access-proxy-virtual-host
edit "webportal"
set ssl-certificate "*.test.com"
set host "web.test.com"
next
end
4. Apply the access proxy to a proxy policy (specify the ZTNA tags as needed):
config firewall proxy-policy
edit 1
set name "ztna_rule"
set proxy access-proxy
set access-proxy "ztna_webportal"
set srcintf "any"
set srcaddr "all"
set dstaddr "all"
set ztna-ems-tag "FCTEMS8821000000_High"
set action accept
set schedule "always"
set logtraffic all
set srcaddr6 "all"
set dstaddr6 "all"
set utm-status enable
set profile-type group
set profile-group "profile group1"
set logtraffic-start enable
next
end
The SSL VPN bookmarks are learned by the WAD daemon and are ready to use.
5. Verify the bookmarks:
# diagnose test app wad 351
[bookmark: (portal/group/name=test_ssl/gui-bookmarks/2nd HTTP)]:
type :1
url :http://httpbin.org
host :
folder:
domain:
port :0
[bookmark: (portal/group/name=test_ssl/gui-bookmarks/FTP)]:
type :4
url :
host :
folder:172.16.200.215
domain:
port :0
[bookmark: (portal/group/name=test_ssl/gui-bookmarks/HTTPS-fortinet)]:
type :1
url :https://www.fortinet.com
host :
folder:
domain:
port :0
[bookmark: (portal/group/name=test_ssl/gui-bookmarks/RDP)]:
type :9
url :
host :172.18.62.213
folder:
domain:
port :3389
…
1. From the client browser, go to https://web.test.com:4443/webportal to access the ZTNA access proxy web portal.
2. Once the client passes the certificate check, posture check, and access is granted, the user is redirected to the web
portal. The list of predefined bookmarks appears.
4. From the web portal, click another bookmark, such as SSH. The page opens with the credential login screen to
access the server.
The following ZTNA enhancements have been made to FortiView and the log view.
l Add FortiView ZTNA Servers monitor, which includes options to drill down by Sources, Rules, Real Servers, and
Sessions.
l Add context menu shortcuts on the ZTNA Rules and ZTNA Servers tabs to redirect to the FortiView and log view
pages.
l Replace Log & Report > ZTNA page with Log & Report > ZTNA Traffic page. ZTNA logs now have a traffic type and
ZTNA subtype.
l Add fields to ZTNA traffic logs (accessproxy, vip, gatewayid, clientdevicetags, clientdeviceid, and
clientdeviceowner).
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules or ZTNA Servers tab.
2. Select an entry in the table.
3. Right-click and select Show in FortiView or Show Matching Logs.
Redirect from ZTNA Rules tab to FortiView monitor (drilled down to Rules view):
Redirect from ZTNA Servers tab to FortiView monitor (drilled down to Sources view):
Sample log
Session-based form authentication for ZTNA allows users to log in through an authentication portal with support for
multi-factor authentication (MFA). This added advantage over the basic type authentication method allows FortiToken
MFA to be applied directly to FortiGate users. FortiToken MFA can be applied to local users or remote users. Session-
based form authentication can also be applied to explicit and transparent web proxies.
Example
In this example, the FortiGate is configured with a ZTNA HTTPS access proxy to protect access to the web server. It
uses session-based form authentication with cookies and auth-portal enabled. It connects to the internal Windows
Active Directory using LDAPS for user authentication, and assigns FortiToken MFA to individual users.
This example assumes that the FortiGate EMS Fabric connector is already successfully connected.
1. Go to User & Authentication > LDAP Servers and click Create New.
2. Configure the following settings:
Name LDAP-fortiad
Certificate Enable and select the CA certificate to validate the server certificate.
Server identity check Optionally, enable to verify the domain name or IP address against the server
certificate.
1. Go to User & Authentication > User Definition and click Create New.
2. Set User Type to Remote LDAP User and click Next.
3. Set LDAP Server to LDAP-fortiad and click Next.
4. For Remote Users, right-click on a user from the list under the corresponding OU and click Add Selected. In this
example, the user tsmith under the Marketing OU is selected.
5. Click Submit.
6. Double-click the new user, tsmith, to edit the settings.
7. Enable Two-factor Authentication. Select either FortiToken Cloud or FortiToken. In this example, FortiToken is
selected with a mobile FortiToken available on this FortiGate.
8. Enter an Email Address for the user to get a token activation notification.
9. Click OK.
1. Go to User & Authentication > User Groups and click Create New.
2. Enter the name of the group, FortiAD-MFA-group.
3. Set Type to Firewall.
4. Click the +in the Members field and add the user, tsmith.
5. Click OK.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Scheme.
2. Enter the name, ZTNA-Auth-scheme.
3. Set Method to Form-based.
4. Set User database to Other and select the LDAP-fortiad LDAP server.
5. Enable Two-factor authentication.
6. Click OK.
Configuring the ZTNA server requires some settings that can only be configured in the CLI. The basic settings are
configured in the GUI first, then the advanced CLI-only configurations are added after.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Enter the server name, ZTNA_S1.
4. Configure the network settings:
a. Set External interface to port3.
b. Set External IP to 10.0.3.10.
c. Set External port to 9443.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP. In this example, the custom certificate, ztna-wildcard is selected.
6. Add server mapping:
a. In the Service/server mapping table, click Create New.
b. Set Service to HTTPS.
c. Set Virtual Host to Any Host.
d. Configure the path as needed.
e. Add a server:
i. In the Servers table, click Create New.
ii. Set IP to 10.88.0.3.
iii. Set Port to 9443.
iv. Click OK to complete the server settings.
f. Click OK to complete the HTTPS service mapping.
7. Click OK.
The following steps are required to create a virtual host and to enable the authentication portal.
1. Create an access proxy virtual host that points to the ZTNA access proxy. The FQDN of the host must be able to
resolve to the external address 10.0.3.10. The client will be redirected to this page for form authentication:
config firewall access-proxy-virtual-host
edit "auth-portal-vhost"
set ssl-certificate "ztna-wildcard"
set host "authportal.ztnademo.com"
next
end
2. Enable auth-portal on the access proxy and point it to the virtual host:
config firewall access-proxy
edit "ZTNA_S1"
set auth-portal enable
set auth-virtual-host "auth-portal-vhost"
next
end
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Click Create New.
3. Enter the name, ZTNA_R1.
4. Set Incoming Interface to port3.
5. Set Source to all. This can also be set to specific IP addresses to only allow those addresses to connect to this
HTTPS access proxy.
6. Click the + in the Source and from the User tab, select the FortiAD-MFA-group user group.
7. Click the + in the ZTNA Tag field and select the Low tag.
8. Set ZTNA Server to ZTNA_S1.
9. Set Destination to Webserver1, which is an address object for 10.88.0.3/32.
10. Configure the remaining options as needed.
11. Click OK.
To test the remote access to the HTTPS access proxy with user authentication:
7. After the user authentication passes, the FortiGate performs a posture check on the endpoint. When the posture
check passes, you are allowed access to the website.
- online: true
- Tags (2):
-- Tag (#0): all_registered_clients
-- Tag (#1): Low
lls_idx_mask = 0x00000001,
l In the CLI:
By default, the connection from the ZTNA access proxy to the backend servers uses the IP address of the outgoing
interface as the source. This enhancement enables customers to use an IP pool as the source IP address, or use the
client's original IP address as the source IP address. This allows ZTNA to support more sessions without source port
conflicts.
For more information about this feature, see Using the IP pool or client IP in a ZTNA connection to backend servers.
NGFW
This section includes information about NGFW policy mode related new features:
l Filters for application control groups in NGFW mode on page 476
When defining application groups in NGFW policy mode, the following group filters are now available: protocols, risk,
vendor, technology, behavior, popularity, and category.
l 0 (network-protocol)
l 1 (browser-based)
l 2 (client-server)
l 4 (peer-to-peer)
behavior <id> Application behavior filter:
l all
l 2 (botnet)
l 3 (evasive)
l 5 (excessive bandwidth)
l 6 (tunneling)
l 9 (cloud)
popularity <integer> Application popularity filter (1 - 5, from least to most popular).
category <id> Application category filter:
l 2 (P2P)
l 3 (VoIP)
l 5 (video/audio)
l 6 (proxy)
l 7 (remote access)
l 8 (game)
l 12 (general interest)
l 15 (network service)
l 17 (update)
l 21 (email)
l 22 (storage backup)
l 23 (social media)
l 25 (web client)
l 26 (industrial)
l 28 (collaboration)
l 29 (business)
l 30 (cloud IT)
l 31 (mobile)
l 32 (unknown applications)
Sample configurations
In this example, a single filter (risk level 1) is configured in the application group, so only signatures matching this filter
will match the security policy.
In this example, the application group is configured so that only signatures matching both filters, category 5 (video/audio)
and technology 1 (browser-based), will match the security policy. The application group can also be configured in a
traffic shaping policy.
Policies
A DNS health check monitor can be configured for server load balancing. The monitor uses TCP or UDP DNS as the
probes. The request domain is matched against the configured IP address to verify the response.
The DNS health check monitor does not support IPv6.
type The monitor type that is used by the health check monitor to check the health of
the server.
port <string> The service port that is used to perform the health check (0 - 65635, default = 0). If
type is set to dns, port is set to 53.
dns-protocol {udp | tcp} The protocol used by the DNS health check monitor to check the health of the
server (default = udp).
dns-request-domain The fully qualified domain name to resolve for the DNS probe (default =
<string> www.example.com).
dns-match-ip <class_ip> The response IP address expected from the DNS server (default =
Example
In this example, a DNS health check monitor is created and used in a VIP.
The FortiGate sends the DNS request on UDP port 53 to the configured real servers every 30 seconds. If the DNS
response from a real server matches the DNS match IP address, then the real server is marked as Active. Otherwise, it
is marked as Down.
set server-type ip
set monitor "dns-monitor-1"
set ldb-method round-robin
config realservers
edit 1
set ip 172.16.200.44
next
edit 2
set ip 172.16.200.55
next
end
next
end
Carrier-grade NAT
Users can control concurrent TCP/UDP connections through a connection quota in the per-IP shaper, and can control
the port quota in the fixed port range IP pool.
config firewall shaper per-ip-shaper
edit <name>
set max-concurrent-tcp-session <integer>
set max-concurrent-udp-session <integer>
next
end
set port-per-user Number of ports for each user (32 - 60416, 0 = default).
<integer>
1. Go to Policy & Objects > Traffic Shaping, select the Traffic Shapers tab, and click Create New.
2. For Type, select Per IP Shaper.
3. Enable Max concurrent TCP connections and enter a value.
This enhancement allows users to create a virtual wire pair policy that includes different virtual wire pairs (VWPs). This
reduces overhead to create multiple similar policies for each VWP. This feature is supported in NGFW profile and policy
mode. In NGFW policy mode, multiple VWPs can be configured in a Security Virtual Wire Pair Policy, and Virtual Wire
Pair SSL Inspection & Authentication policy.
The VWP settings must have wildcard VLAN enabled. When configuring a policy in the CLI, the VWP members must be
entered in srcintf and dstintf as pairs.
On the Firewall Virtual Wire Pair Policy, Security Virtual Wire Pair Policy, and Virtual Wire Pair SSL Inspection &
Authentication pages, there is a dropdown option to view policies with an individual VWP or all VWPs.
If All VWPs is selected, the Interface Pair View is disabled. The list displays all policies with an individual VWP or multiple
VWPs.
If an individual VWP is selected, the Interface Pair View is disabled if at least one policy has other VWP members. The
list displays all policies with the selected VWP (the policy may have members of other VWPs).
Name test-vwp-1
c. Click OK.
d. Click Create New > Virtual Wire Pair and create another pair with the following settings:
Name test-vwp-2
e. Click OK.
2. Configure the policy:
a. Go to Policy & Objects > Firewall Virtual Wire Pair Policy and click Create New.
b. In the Virtual Wire Pair field, click the + to add test-vwp-1 and test-vwp-2. Arrow buttons appear below the
entries to set the direction for each of the selected virtual wire pairs.
Multiple NAT46 and NAT64 related objects are consolidated into regular objects. A new per-VDOM virtual interface,
naf.<vdom>, is automatically added to process NAT46/NAT64 traffic. The new changes and additions include:
l Consolidate vip46 and vip64 setting into vip and vip6 configurations.
l Consolidate policy46 and policy64 settings into firewall policy settings.
l Introduce nat46/nat64 in firewall policy settings.
l Extend ippool and ippool6 to support NAT46 and NAT64 (when enabled, the IP pool should match a subnet).
l Extend central SNAT to support NAT46 and NAT64.
l Remove firewall vip46/vip64, vipgrp46/vipgrp64, and policy46/policy64 settings and GUI pages.
l Rename system.nat64 to system.dns64.
l Add option for add-nat46-route in ippool6 and add-nat64-route in ippool, which are enabled by default.
The FortiGate will generate a static route that matches the IP range in ippool6 or ippool for the naf tunnel
interface.
Automatic processing of the naf tunnel interface is not supported in security policies.
To configure NAT46/NAT64 translation, use the standard vip/vip6 setting, apply it in a firewall policy, enable
NAT46/NAT64, and enter the IP pool to complete the configuration.
The external IP address cannot be the same as the external interface IP address.
Examples
IPv6 must be enabled to configure these examples. In the GUI, so go to System > Feature Visibility and enable IPv6. In
the CLI, enter the following:
config system global
set gui-ipv6 enable
end
NAT46 policy
In this example, a client PC is using IPv4 and an IPv4 VIP to access a server that is using IPv6. The FortiGate uses
NAT46 to translate the request from IPv4 to IPv6 using the virtual interface naf.root. An ippool6 is applied so that the
request is SNATed to the ippool6 address (2000:172:16:101::1 - 2000:172:16:101::1).
Name test-vip46-1
Interface To_vlan20
c. Click OK.
2. Configure the IPv6 pool:
a. Go to Policy & Objects > IP Pools and click Create New.
b. Enter the following:
Name test-ippool6-1
NAT46 Enable
c. Click OK.
3. Configure the firewall policy:
a. Go to Policy & Objects > Firewall Policy and click Create New or edit an existing policy.
b. Enter the following:
Name policy46-1
Source all
Destination test-vip46-1
Schedule always
Service ALL
Action ACCEPT
NAT NAT46
d. Click OK.
The IPv4 session is between the incoming physical interface port24 and naf.root. The IPv6 session is between the
naf.root and the outgoing physical interface port17.
NAT64 policy
In this example, a client PC is using IPv6 and an IPv6 VIP to access a server that is using IPv4. The FortiGate uses
NAT64 to translate the request from IPv6 to IPv4 using the virtual interface naf.root. An ippool is applied so that the
request is SNATed to the ippool address (172.16.101.2 - 172.16.101.3).
An embedded VIP64 object is used in this configuration so a specific IPv4 mapped IP does not need to be set. The lower
32 bits of the external IPv6 address are used to map to the IPv4 address. Only an IPv6 prefix is defined. In this example,
the IPv6 prefix is 2001:10:1:100::, so the IPv6 address 2001:10:1:100::ac10:c89c will be translated to 172.16.200.156.
Name test-vip64-1
c. Click OK.
2. Configure the VIP with the embedded IPv4 address enabled:
a. Go to Policy & Objects > Virtual IPs and click Create New > VIP.
b. Enter the following:
Name test-vip64-2
c. Click OK.
3. Configure the IP pool:
a. Go to Policy & Objects > IP Pools and click Create New.
b. Enter the following:
Name test-ippool4-1
Type Overload
NAT64 Enable
c. Click OK.
4. Configure the firewall policy:
a. Go to Policy & Objects > Firewall Policy and click Create New or edit an existing policy.
b. Enter the following:
Name policy64-1
Source all
Destination test-vip64-1
test-vip64-2
Schedule always
Service ALL
Action ACCEPT
NAT NAT64
d. Click OK.
next
end
The IPv6 session is between the incoming physical interface port24 and naf.root. The IPv4 session is between the
naf.root and the outgoing physical interface port17.
3. Verify the embedded VIP64 traffic by the sniffer packets:
(root) # diagnose sniffer packet any 'icmp or icmp6' 4
interfaces=[any]
filters=[icmp or icmp6]
The FortiGate can read the Cisco Security Group Tag (SGT) in Ethernet frames, and use them as matching criteria in
firewall policies. A policy can match based on the presence of a SGT, or the detection of a specific ID or IDs.
When a packet with a SGT passes through and a session is established, the ext_header_type=0xc5:0xc5 flag is
included in the session table.
This feature is available in flow mode policies for virtual wire pair policies or policies in transparent mode VDOMs.
Examples
In these examples, port2 and port5 are in a virtual wire pair. Firewall policies are created that pass traffic with SGTs with
a specific ID number, any ID number, or either of two specific ID numbers.
next
end
To configure a firewall policy to match frames that have an SGT with ID 20 and allow them through:
To configure a firewall policy to match frames that have an SGT with any ID:
To configure a firewall policy to match frames that have the SGT with IDs 20 or 21:
Objects
Daily hit counts for central NAT and DNAT can be displayed in the CLI for IPv4 and IPv6.