article

vpolovnikov avatar image
3 Likes"
vpolovnikov posted

ZTNA and IP/MAC Access Control: Detailed Overview

ZTNA vs IP/MAC Access Control

Overview
ZTNA vs IP/MAC Access Control

  • ZTNA access proxy allows users to securely access resources through an SSL encrypted access proxy. This simplifies remote access by eliminating the use of VPNs.
  • IP/MAC based access control combines IP/MAC with uses ZTNA tags for identification and security posture check to implement role-based zero trust access.

(refer to the official Fortinet documentation)

1675108895892.png

In essence, the fundamental difference between ZTNA Access Proxy and IP/MAC Access control uses case lies within the endpoints’ location and connection to on-premises network.

ZTNA Access Proxy enforces device verification and posture check (via ZTNA tags) when accessing internal resources from outside of the corporate network without VPN connection.

IP/MAC Access Control is applied to clients inside the network as well as external machines connected via VPN tunnel. Posture check and role-based access control enforced by the same ZTNA tags.


ZTNA Access Proxy

ZTNA Access Proxy relies on device’s verification via certificate authentication as well as posture check with the means of ZTNA tags.

Two main types of ZTNA Access Proxy are HTTPS Access Proxy and TCP Forwarding Proxy.

One of the key differences between HTTPS Access Proxy and TCP Forwarding Proxy is how to access a protected internal resource from the endpoint.

HTTP Access Proxy protected web server is accessed via the Proxy Gateway address when navigating via the browser. The endpoint itself has to have a capacity to resolve the Proxy Gateway address which points to the FortiGate’s public facing ZTNA server.

On the other hand, TCP Forwarding protected resource can be accessed only via the Destination Host address. This address has to be resolved by the FortiGate, otherwise, the endpoint would fail to establish connection.

1675109259811.png

With the latter method, FortiClient modifies the device’s host file (https://docs.fortinet.com/document/forticlient/7.0.7/administration-guide/814327/fqdn-based-ztna-tcp-forwarding-services)



IP/MAC Access Control

Fundamental components of the IP/MAC Access Control are ZTNA tags and FortiClient’s connection relative to FortiGate.

Based on the connection – whether it’s VPN tunnel or FortiGate serving as default gateway – firewall will use either endpoint’s source IP-address or MAC-address to match the device’s traffic to ZTNA tags received from EMS. Then, the filtering will be performed based on the firewall policies.

As opposed to ZTNA Access Proxy there’s no ZTNA certificate in this architecture as the endpoints are either VPN-connected or located on-premises.


FortiGate – FortiClient\EMS Tag Sharing Mechanics

Overview – Key Points

  • EMS – FortiGate communication is handled by the NAC daemon on the firewall
  • FortiClient – FortiGate ZTNA server relationship is handled by the WAD daemon
  • IP/MAC addresses are very important for the IP/MAC based Access Control since FortiGate uses the incoming traffic's IP/MAC information to determine which tags are associated with the endpoint making connection. Note, ZTNA doesn't require neither IP nor MAC to determine which tags are associated with endpoint establishing the connection.
  • When it comes to ZTNA, FortiGate uses incoming client's certificate CN to query EMS and verify what tags are applied to client based on FortiClient’s UUID (CN of the certificate)
  • The FortiClient\EMS Endpoint Sharing setting determines what endpoints' IP/MAC information is sent to the FortiGate in question:
  • EMS and FortiGate communicate over API calls when it comes to Zero Trust tags and endpoint information exchange
  • The two primary API endpoints discussed in this document are \tags and \sysinfo
  • The \tags endpoint delivers Zero Trust tags and IP/MAC addresses of the FortiCliens having the tags assigned
  • The \sysinfo endpoint delivers devices’ system information (AV signatures, FortiClient version installed, etc.)


Case 1 – FortiClient directly connected to the ‘Main FortiGate’

Topology

1675110046083.pngOverview

  • For directly connected FortiClients, FortiGate sends gateway list to EMS. If the former requires further updates about tags, EMS can rely on the gateway list to identify which clients are directly connected to the firewall and send the tags associated with them. EMS retrieves the information about FortiClient endpoints’ gateways (MAC- and IP-address) via Telemetry protocol.
  • For directly connected endpoints, FortiGate requests tag information in bulk. It sends its own interface’s MAC and IP (which is the gateway for the endpoints).
  • FortiGate requests /tags information periodically (scheduled API call)


CLI Commands

# diagnose endpoint record list

Returns endpoint information including UUID, IP-address, FortiClient version, etc.

# diagnose firewall dynamic list

Returns both IP- and MAC-address associated with the tagged FortiClients.

# diagnose test application fcnacd 8

Returns the IP-addresses of the endpoint


Case 2.1 – FortiClient connected to the ‘Other FortiGate’

Topology

1675184038443.pngOverview

FortiClient is located behind the ‘Other FortiGate’ while the ‘Main FortiGate’ is the one that has firewall policies with the Zero Trust Tags applied.

EMS is set to share endpoints connected to ‘this fabric device’ which in this case is Other FortiGate.

Outcome:

EMS won’t share neither IP information associated with tagged FortiClients nor endpoint information with the Main FortiGate.

CLI Commands

# diagnose endpoint record list

Returns no records related to endpoint information.

# diagnose firewall dynamic list

Returns no IP - tag information associated with the endpoints.


Case 2.2 – FortiClient connected to the ‘Other FortiGate’

Topology

1675184376275.pngOverview

FortiClient is located behind the ‘Other FortiGate’ while the ‘Main FortiGate’ is the one that has firewall policies with the Zero Trust Tags applied.

EMS is set to share all endpoints connected to it.

Outcome:

EMS will send IPs associated with all tagged FortiClients connected to it.

EMS won’t send any endpoint information to the Main FortiGate.

Remember: The FortiClient\EMS Endpoint Sharing setting only affects the /tags API endpoint (not /sysinfo endpoint).

CLI Commands

# diagnose endpoint record list

Returns no records related to endpoint information.

# diagnose firewall dynamic list

Returns all IP-addresses associated with the tagged FortiClients behind Other FortiGate.


Case 3 – FortiClient connects via ZTNA to ‘Main FortiGate’

Topology

1675184567591.pngOverview

Current example is a common scenario for FortiSASE deployments.

FortiSASE establishes Fabric Connector with on-prem FortiGate. FortiClient connects via full-tunnel VPN to FortiSASE.

Once FortiClient attempts to establish connection to ZTNA server, FortiGate extracts client ZTNA certificate’s CN and performs an API call to the FortiSASE’s API endpoint to retrieve zero trust tags associated with the machine. Besides, FortiGate also retrieves endpoint information via including ZTNA certificate’s S/N, AV signatures, FortiClient version, etc.

CLI Commands

# diag firewall dynamic list

No entries for the remote endpoint since FortiGate doesn’t use IP/MAC information for ZTNA server connections.

# diag endpoint record list

Will depict endpoint’s information including IP-address (VPN), UUID, certificate SN, public address etc.

# diag test application fcnacd 7

Shows cached information about FortiClients initiated ZTNA connections to FortiGate (endpoints’ UUIDs, certificates' S/N, tags)

# diagnose wad worker policy list

Lists the ZTNA rules. Helpful to check whether a ZTNA policy gets a hit (shows the traffic volume associated with the ZTNA policy).


# diag wad debug enable category policy

# diag wad debug enable level verbose

# diag debug enable

The above commands will output the logs of a on-going ZTNA connection. Helpful to see the process of ZTNA rule matching on initial connection attempt.


Case 4 – FortiClient connected to the ‘Main FortiGate’ via VPN

Topology

1675184900169.pngOverview

Upon FortiClient’s VPN connection to the Main FortiGate, firewall's VPN daemon chains UUID information of the FortiClient to the fcnacd application that handles fabric communication with EMS. That process makes an API call to retrieve tags as well as endpoint information about connected FortiClient based on the UUID.

On VPN disconnection, FortiGate clears the address table for the endpoint (#diag firewall dynamic list) as well as endpoint’s information (#diag endpoint record list).

CLI Commands

# diag endpoint record list

EMS will send endpoint’s information including VPN interface’s IP-address

# diag firewall dynamic list

The command will show the FortiClient's VPN interface IP-address associated with the endpoint’s tags.

# diag test application fcnacd 8

The output will be the list of IP-addresses associated with machines having tag information sent by EMS.


ZTNA Endpoint Component - FortiClient

FortiClient Connection to Network Resources

Overview

FortiClient plays a role of an agent compliance of which will dictate whether access to the internal resource is allowed or prohibited (IP/MAC-based access or ZTNA server access).

With the ZTNA architecture, FortiGate first verifies the identity of the client – ZTNA certificate (S/N), and then checks its compliance aka what tags belong to the client. The action will be performed based on the configured ZTNA rules.

With IP/MAC-based, FortiGate will act upon the information received from EMS (MAC- and/or IP-address) and tags associated with them.


FortiClient’s ZTNA Certificate

ZTNA certificate is the result of initial registration to EMS. FortiClient sends the CSR request which gets signed vis EMS ZTNA CA certificate.

On Windows, the ZTNA certificate is stored in the personal user certificate store.

On MacOS, the certificate is located under the Keychain Access > login > Certificates.

The communication with EMS regarding the certificate retrieval can be traced via FortiClient’s debug FortiESNAC logs (Windows) and epctrl (Mac).

FortiClient Zero Trust Tags

On the FortiClient console, the zero trust tags can be viewed under the user’s avatar.

Zero Trust tagging rules are created on EMS. EMS sends these rules to FortiClient which performs the calculation of whether the system matches the rules. The result is the bitmap that the endpoint sends back to EMS via Telemetry protocol. EMS evaluates the bitmap and sends the final result of what tags the machine should have.

Evaluation of the tagging rules as well as communication with EMS can be tracked via the FortiClient's debug FortiESNAC logs.

1675185471902.png


FortiClient ZTNA FQDN-based TCP Forwarding proxy

1675185506589.png

When configuring FQDN-based ZTNA Forwarding Proxy connection rule, FortiClient modifies the host file of endpoint. 1675185543149.png

The IP-addressing scheme is 10.235.0.1, 10.235.0.2, etc.

When accessing the resource via the Destination Host address, FortiClient sends the following request to the FortiGate:

https://172.31.200.244:9833/tcp?address=win.rdp.fortitest.net&port=3389&tls=0

If FortiGate can resolve the DNS name, then it sends the response to proceed with the tunnel establishment. In case FortiGate can’t resolve the DNS name the connection won’t be established.

For deeper analysis and troubleshooting of the above, one can enable debug log level for the endpoint and add the following processes to the list of log events: transctrl, fortitcs. (https://docs.fortinet.com/document/forticlient/7.0.7/xml-reference-guide/921514/log-settings)

These logs will be included into the FortiClient's diagnostics output file.


Troubleshooting

For troubleshooting examples one can refer to the "ZTNA and IP/MAC Access Control: Troubleshooting" FortiAnswers article.

FortiGateFortiSASEFortiClientFortiClient EMSZTNA
1675184038443.png (244.9 KiB)
1675184376275.png (220.8 KiB)
1675184567591.png (249.6 KiB)
1675184900169.png (258.0 KiB)
1675185471902.png (125.5 KiB)
1675185506589.png (71.6 KiB)
1675108895892.png (154.1 KiB)
1675109259811.png (123.6 KiB)
1675110046083.png (188.0 KiB)
1675185543149.png (126.7 KiB)
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Welcome to FortiAnswers

FortiAnswers is the space dedicated to FortiSASE and FortiOS questions and suggestions.

  • Please review the Community guidelines
  • If you are a moderator, please refer to the Moderation guidelines
  • If something in the above guidelines is unclear, please post your question to the Community Feedback space or the Moderators' space

Article

Contributors

vpolovnikov contributed to this article