FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Divya_N
Staff
Staff
Article Id 414901
Description This article describes a ZTNA access proxy configuration example.
Scope FortiOS, FortiClient.
Solution

This article focuses on a TCP forwarding access proxy configured for RDP connections.

 

Network Diagram:

 

TCP proxy.png

 

In this example, FortiGate has a successful connection with FortiClient EMS, and ZTNA tags are synced to the FortiGate.

 

EMS is deployed on the Winserver and the same server has port 3389 open for the RDP connection.

 

Configuration details:

On FortiGate, navigate to Policy & Objects -> ZTNA -> ZTNA Server and configure the access proxy VIP for the RDP access:

 

VIP config.png

 

To configure the mapped port and TCP forwarding to the access proxy VIP, edit Service/Server mapping and configure the settings as follows:

 

mapping.png

 

Configuration of access proxy in CLI:

 

config firewall vip
    edit "RDP"
        set uuid c961eb5a-cba8-51f0-0bd0-83f230f0c5cd
        set type access-proxy
        set server-type https
        set extip 10.109.22.118
        set extintf "port2"
        set extport 8443
        set ssl-certificate "Fortinet_Factory"
    next
end

 

config firewall access-proxy
    edit "RDP"
        set vip "RDP"
            config api-gateway
                edit 1
                    set url-map "/tcp"
                    set service tcp-forwarding
                        config realservers
                            edit 1
                                set address "Internal RDP"
                                set mappedport 3389
                            next
                        end
                    next
                end
            next
        end

 

The address object for the forwarding server is configured as follows:

 

Address obj.png

 

Here, a proxy firewall policy with type 'ZTNA' is configured, defining the  ZTNA server and destination as the real server address, with ZTNA tags enforced:

 

policy.png

 

On the FortiClient, ZTNA destinations are configured as follows:

 

FCT.png

 

On the client PC, navigate to RDP and open the connection for the internal server IP, and successful connection will provide RDP access.

 

RDP.png

 

Logs for the successful RDP connection:

 

logs.png

 

Debugging:

WAD debug logs can generate too much output and debug lines. It is highly recommended to use as much as filters possible  that can narrow down the generated logs by WAD daemon.

 

diagnose debug disable

diagnose deb reset

diagnose wad filter clear

diagnose debug console time enable

diagnose wad filter src x.x.x.x   <----- x.x.x.x is the client IP address.

diagnose wad filter dport xxx     <----- xxx is the destination port in ZTNA configuration.

diagnose wad debug enable category all 

diagnose wad debug enable level verbose

diagnose wad filter list 

diagnose wad debug show 

diagnose debug enable

 

To stop WAD debugging:

 

diagnose debug disable

diagnose wad filter clear 

diagnose debug reset