--- title: "System security - best practices" slug: "system-security-best-practices-v7-0" description: "Enhance your AppGate ZTNA security with essential hardening steps, including SSH key management, MFA, and network access restrictions for robust protection." tags: ["System Security", "Security Best Practices", "System Hardening"] updated: 2026-10-27T13:17:22Z published: 2026-10-27T13:17:22Z canonical: "support.appgate.com/system-security-best-practices-v7-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.appgate.com/llms.txt > Use this file to discover all available pages before exploring further. # System security - best practices AppGate ZTNA appliances are secure by design and include hardening steps from the [Security Technical Implementation Guide](https://ubuntu.com/security/certifications/docs/disa-stig) (STIG) for Ubuntu, developed by the Defense Information System Agency (DISA). The steps in this section describe additional measures you can take to improve system security. Each step is independent and you can implement one or more in any combination. This section covers the security of the AppGate ZTNA Collective and its related configurations. It does not cover general network security or the security of protected resources accessed through AppGate ZTNA. --- ## AppGate ZTNA system hardening steps ### 1. Proxy protocol The **System TLS Connection** can be configured to use proxy protocol by selecting ***Enable Proxy Protocol***. When this option is enabled, the system accepts client connections that use either the SPA key or proxy protocol. You must limit allowed connection sources to the proxy only—otherwise, users connecting directly can bypass SPA and spoof their `clientSrcIP` by crafting a proxy protocol packet that contains a spoofed IP address. **Action:** Set [Allowed Sources](/v1/docs/adding-a-new-appliance-v7-0) to the proxy’s IP address only. > [!NOTE] > **NOTE** > > By default, ***Allowed Sources*** includes two entries: `0.0.0.0/0` and `::/0`. Edit or delete both entries before adding the proxy source, otherwise the new entry will be overridden. ### 2. Device registration AppGate ZTNA can limit new device connections to the system. A new device registration occurs the first time the system encounters a specific combination of user and device. You can restrict new device registrations by quantity per user, by multi-factor authentication (MFA), or both. Use ***Prevent new device registrations that exceed this per user limit*** in the identity provider to set a maximum number of devices per user—for example, one or two. After all required devices are registered, block all new registrations by setting the limit to zero. This does not affect existing registered devices. To add a new device later, remove an existing device from the [registered devices](/v1/docs/device-registration-v7-0) list. After the per-user limit is checked, you can apply MFA at sign-in to further restrict new device registrations. The available options are: - **Not required**: All new devices are registered automatically. - **Once**: MFA is required to register each new device. - **Always**: MFA is required at every sign-in. For more information, see [Multifactor authentication](/v1/docs/mfa-providers-v7-0). **Actions**: - Set a suitable value for [Prevent new devices registrations that exceed this per user limit](/v1/docs/general-settings-ldap-v7-0#signin-settings) - Select [Once (MFA required to register all new devices)](/v1/docs/general-settings-ldap-v7-0#signin-settings) > [!NOTE] > **NOTE** > > The default setting for MFA at Sign-in is ***Not required***. ### 3. Using IP addresses instead of hostnames A Gateway or Connector hostname does not need to be published outside the AppGate ZTNA system—not even to users. Using IP addresses instead of hostnames means no external DNS records exist for these appliances. Combined with SPA (particularly in UDP-TCP mode), this makes the appliances extremely difficult to locate, which in turn makes attacks significantly harder to mount. New hidden Gateways can also spin up automatically, and users fail over to them without disruption, providing effective DDoS mitigation. **Actions**: - [Use IP addresses for Client Hostname/IP](/v1/docs/adding-a-gateway-v7-0#secure-tunnel-settings) on Gateways - [Use IP address for the Appliance Hostname](/v1/docs/adding-a-new-appliance-v7-0#settings) on Connectors ### 4. SSH credentials When you set up a new appliance from the command line, the first Controller is seeded with a `cz` user password for SSH access. Cloud instances are an exception—they require PKI authentication. Public key authentication is stronger than password-based authentication. Change the SSH authentication method to public key for the first Controller. First generate your SSH key pair. #### Add SSH keys To add an SSH key for the `cz` user on an appliance, run one of the following commands from the command line on the first Controller: ```plaintext sudo cz-config user --authorized-keys "KEY" ``` Replace `KEY` with your SSH key pasted between the quotation marks—for example, `"ssh-rsa AABBCCDD......"` ```plaintext sudo cz-config user --authorized-keys-file FILE ``` Replace `FILE` with the path to your SSH key file. These commands overwrite any existing keys. To add a key without removing existing keys, follow these steps instead: 1. Copy `/home/cz/.ssh/authorized_keys` to a new location, such as `temp/new_keys`. 2. Open the copied file, add the new key on a new line, and save. Each key must be on its own line. 3. Run: `sudo cz-config user --authorized-keys-file FILE` #### Pin SSH keys To pin the keys and prevent a cloud provider from overriding them, run: `sudo cz-config user --pin {true,false}` The default value is `false`. Then, in the admin UI, go to **System > Appliances > System Settings > Settings > SSH Server**, and disable ***Password Authentication***. An anti-bot feature prevents repeated password guessing attempts. You can configure the threshold at which this feature activates. See [Advanced > SSH command line administration](/v1/docs/ssh-command-line-v7-0). ### 5. SSH server access (default port 22) Exposing SSH access to appliances from the internet increases security risk. Limit SSH access to an internal or management network using one of the following methods: - Configure your network security group or firewall rules to block port 22 from external sources. - Use a separate management network connected to a [separate network interface on the appliance](/v1/docs/adding-a-new-appliance-v7-0#system-settings), then specify only that interface in [Allowed Sources for the SSH Server](/v1/docs/adding-a-new-appliance-v7-0#ssh-server) under Network Interface. - Set [Allowed Sources for the SSH Server](/v1/docs/adding-a-new-appliance-v7-0#ssh-server) to the internal network address and netmask length. > [!NOTE] > **NOTE** > > The default configuration includes two sources: `0.0.0.0/0` and `::/0`. Edit or delete both before adding new sources, otherwise new entries will be overridden. For systems accessible through an AppGate ZTNA Gateway, you can improve security further by using the AppGate ZTNA client and providing access through the tunneled interface (port 443) using an entitlement to port 22 on the internal interface of the appliance. **Action:** Add one or more appliance access entitlements for port 22 to the administrator policy that already contains the admin roles. ### 6. MFA for admins AppGate ZTNA supports mandatory MFA for administrators. Admin MFA can be linked to a specific MFA provider, which can differ from the one used by standard users. See [MFA for admins](/v1/docs/mfa-for-admins-v7-0). **Action:** Enable MFA for administrators. > [!NOTE] > NOTE > > Admin MFA is disabled by default. When enabling it, exclude any API users if you use APIs to manage the Controller. ### 7. Admin roles AppGate ZTNA includes a role-based delegated administration system. For each role, you can configure the privilege type (for example, read), the target (for example, entitlements), and the scope (for example, tagged with). Roles can be assigned with the same level of granularity as entitlements in policies. **Actions**: - [Configure delegated admin roles based on least privilege](/v1/docs/admin-user-access-v7-0). Add any API users and restrict their rights to only the APIs they use to manage the Controller. - [Remove over-privileged admin accounts](/v1/docs/policies-v7-0). ### 8. Admin rights In **Policies** (Access > Policies), you can define assignment criteria that control when specified admin roles apply—the same way you configure user entitlements. Available criteria include: - IP-based criteria—for example, to allow only internal IP addresses - Time-based criteria—for example, to allow access only during working hours - GeoIP-based criteria—for example, to allow access only from specific locations **Action**: [Configure the assignment criteria in the admin UI access policy](/v1/docs/configuring-policies-v7-0#access-policy) ### 9. Admin token expiration When an admin signs in to the admin UI, they can select the ***Keep me signed in until the token expires*** checkbox. A cached valid token survives a reboot and allows immediate access to the admin UI when the browser reopens. To prevent unauthorized access, apply the following measures. ![Shows the Keep me signed in option selected.](https://cdn.us.document360.io/e7482ce5-acfa-4c3b-b76c-b6c32472644a/Images/Documentation/image(32).png?sv=2026-02-06&spr=https&st=2026-11-21T21%3A39%3A48Z&se=2026-11-21T22%3A39%3A48Z&sr=b&sp=r&sig=9m8XHuW3LYnCMH6CAKHwxWqdm0g72cKf%2BbzLLFHtppo%3D) The cached token is removed when the user signs out of the admin UI. All remaining tokens also expire when the user signs out, even if the session is still active. **Actions**: - Select ***Keep me signed in until the token expires*** only on secure computers. - Always sign out of the admin UI using the sign-out option at the top right. - Set the [Administration Token Expiration](/v1/docs/global-settings-v7-0) to a value that meets the access needs of your admins while aligning with security best practices (default is 24 hours). ### 10. Admin/API TLS Connection (default port 8443) Port 8443 is used for admin users and API calls and applies to [Controllers](/v1/docs/adding-a-controller-v7-0#admimapi-tls-connection) and the [LogServer](/v1/docs/adding-a-logserver-v7-0#adminapi-tls-connection) only. This port is not protected by SPA. Do not allow admin access from the internet. Limit access to an internal or management network using one of the following methods: - Configure your external firewall rules or cloud provider network security group to allow port 8443 access from the internal network only. - Set ***Allowed Sources*** for the internal network—for example, `eth1`. ![List of allowed sources with associated network interface cards for configuration.](https://cdn.us.document360.io/e7482ce5-acfa-4c3b-b76c-b6c32472644a/Images/Documentation/allowed_sources.png?sv=2026-02-06&spr=https&st=2026-11-21T21%3A39%3A48Z&se=2026-11-21T22%3A39%3A48Z&sr=b&sp=r&sig=UBuxKkD%2B%2FsvVi7zWeL1aTwZA1711YK6CsOII6Egxjso%3D) > [!NOTE] > **NOTE** > > The default configuration includes two sources: `0.0.0.0/0` and `::/0`. Edit or delete both before adding new sources, otherwise new entries will be overridden. - Provision access to the admin UI through an AppGate ZTNA Gateway. Using the AppGate ZTNA client, grant access to the internal IP address of the Controller or LogServer through the Gateway's tunneled interface (port 443). Create a Controller or LogServer access entitlement using their internal IP addresses on port 8443 and add it to the administrator policy. ### 11. Admin/API TLS Connection HTTPS certificate Admin/API access uses the ***Unique Admin Hostname***, which uses a self-signed root certificate. Browsers do not trust this certificate by default and display an "unsafe" warning. To remove this warning, use an externally signed certificate. This requires a PKCS#12 file containing a certificate for the ***Unique Admin Hostname*** signed by a trusted certificate authority (CA), and the private key used to terminate the admin and API HTTPS connection. Adding a trusted certificate associates it with the port defined in the **Admin/API TLS Connection** only. A trusted certificate removes the browser warning and eliminates the possibility of man-in-the-middle attacks. It also simplifies setting up API calls to the Controller using TLS. **Action**: Add a trusted certificate for the [Admin/API TLS connection](/v1/docs/adding-a-controller-v7-0#admimapi-tls-connection), or trust the self-signed root certificate. ### 12. Use of SPA Client and peer connectivity requires sending a Single Packet Authorization (SPA) packet before establishing a connection. By default, AppGate ZTNA uses SPA for all communications from clients to Controllers and Gateways, and between peers, using TCP SPA mode. UDP-TCP SPA mode provides stronger protection. **Action**: [Enable UDP-TCP SPA](/v1/docs/global-settings-v7-0) > [!NOTE] > **NOTE** > > UDP traffic on ports 53 and 443 must be allowed to appliances for UDP-TCP SPA to work reliably. > [!NOTE] > **NOTE** > > Users may have difficulty connecting from locations with strict outbound UDP firewall rules. UDP-TCP SPA mode includes SPA overrides that you can configure to address this. ### 13. System TLS connection (using SPA) Clients and other appliances within the Collective connect to the System TLS Connection (default port 443) on each appliance. This port is protected by SPA and is designed to be exposed to the internet. In constrained use cases, you can improve security further by restricting access to specific networks—for example, to allow access from a wired network but not Wi-Fi, or to block connections from the internal NATed IP of a firewall while still allowing other internal access. **Actions**: - Configure your cloud provider’s network security group or external firewall rules to allow port 443 access from a defined subnet only. - Set [Allowed Sources in System TLS Connection from a defined subnet](/v1/docs/adding-a-controller-v7-0#system-tls-connection-using-spa). > [!NOTE] > **NOTE** > > The default configuration includes two sources: `0.0.0.0/0` and `::/0`. Edit or delete both before adding new sources, otherwise new entries will be overridden. ### 14. Client inactivity timeout Desktop clients sign out automatically when the user or network has been inactive for the configured timeout period. This feature closes open tunnels to Gateways and stops background traffic from unattended machines. When combined with a suitable remedy action, it requires user interaction when the client reconnects. **Action**: Set a [suitable timeout period and timeout trigger](/v1/docs/general-settings-ldap-v7-0#client-settings). ### 15. Access to other services For each appliance, you can restrict access to additional services beyond SSH. You can add allowed sources for Ping and restrict allowed sources for SNMP, Healthcheck (port 5555), and Prometheus (port 5556). Limit access to each service to only the hosts that require it. **Action**: Set [Allowed Sources for each service](/v1/docs/adding-a-new-appliance-v7-0#system-settings) using address and netmask length, network interface, or both. > [!NOTE] > **NOTE** > > Default options may include two sources: `0.0.0.0/0` and `::/0`. Edit or delete both before adding new sources, otherwise new entries will be overridden. ### 16. Site access When you configure a new appliance, you can restrict the extent of a user's network access by defining specific ***Allowed Destinations*** for the Gateway rather than using a broad address range or a single network interface. This setting works in series with entitlement-based access rights. If a delegated administrator misconfigures an entitlement, the ***Allowed Destinations*** rule may still block the traffic. **Action**: [Define one or more Client Tunneling - Allowed Destinations](/v1/docs/adding-a-gateway-v7-0#secure-tunnel-settings) entries that set the maximum extent of user access for a given Site. ![Configuration settings for Allow Destinations with network address, netmask length, and interface input.](https://cdn.us.document360.io/e7482ce5-acfa-4c3b-b76c-b6c32472644a/Images/Documentation/image(33).png?sv=2026-02-06&spr=https&st=2026-11-21T21%3A39%3A48Z&se=2026-11-21T22%3A39%3A48Z&sr=b&sp=r&sig=N13p3aOxnwuhvSnFNSbjFvUG%2BG3UnEuRkEZ6%2F9u1Yv8%3D) > [!NOTE] > NOTE > > ***Allow Destinations*** is empty by default. No packets pass through until you configure at least one entry. ### 17. Use of mTLS All internal communications within an AppGate ZTNA Collective use mutual TLS (mTLS). The Controller may also interface with external systems. Use mTLS for those communications wherever possible. **Action**: [Enable TLS and use the trusted certificate store for the certificates from the external systems.](/v1/docs/internal-certificates-v7-0) > [!NOTE] > **NOTE** > > Some external system configurations use a local setting instead of the trusted certificate store. ### 18. Securing NTP AppGate ZTNA relies on NTP to maintain the integrity of security mechanisms such as SPA and TLS. The default NTP configuration uses unauthenticated public Ubuntu NTP servers, which means NTP replies could be intercepted and modified. **Action**: Delete the default NTP servers [and replace them with alternative servers](/v1/docs/adding-a-new-appliance-v7-0#dns-and-ntp-servers). Private NTP servers on a protected network are preferred. If private servers are not available, secure the new servers by selecting the ***Symmetric Key Type*** SHA512 or SHA384 and entering the related key number and key value. ![](https://cdn.us.document360.io/e7482ce5-acfa-4c3b-b76c-b6c32472644a/Images/Documentation/Screenshot from 2026-10-27 14-11-25.png?sv=2026-02-06&spr=https&st=2026-11-21T21%3A39%3A48Z&se=2026-11-21T22%3A39%3A48Z&sr=b&sp=r&sig=Y8BIA6erS6j1PrpIj4zakVPSdORqF7Zfvnk3sBNI3Ko%3D) ### 19. Appliance customizations Appliance customizations allow the execution of arbitrary code with root privileges. When you save a new appliance seed file in the admin UI, customizations are disabled by default. Do not enable this feature unless it is required. You can also disable or enable customizations from the command line at any time. **Action**: [Disable the appliance customization feature if it is not required](/v1/docs/adding-third-party-executables-v7-0#appliance-customizations-script). ### 20. Client auto-update service The auto-update service runs on the client machine and increases the attack surface of clients. If you do not use this feature to deploy upgrades across your users, disable the service. **Action**: [Disable the auto-updater](/v1/docs/installing-and-updating-clients-v7-0#autoupdate). ### 21. Client security Install clients through an enterprise device management system such as Intune, Jamf, or SCCM, and push the AppGate ZTNA client profile as part of the installation parameters. To ensure the client always runs with this default configuration, set a device policy that prohibits configuration changes to the following client functions: - Autostart - Add and remove profiles - Keep me signed in - Browser and certificate auto sign-in - Suspend - Sign out - Quit ### 22. Portal appliance The Portal is an edge device with a ***Portal Hostname*** that typically has a public DNS record. This means HTTPS (port 443) and any configured listening ports—forwarded through Gateways to protected hosts—are open to the internet. Neither is protected by SPA, making the Portal more exposed than other appliances in the Collective. A compromised Portal appliance could expose data to an attacker or serve as a jump server. **Actions**: - Limit access to the Portal appliance by: - Setting inbound firewall rules for port 443 and any listening ports only. - Setting [Allowed Sources in HTTPS Settings](/v1/docs/adding-a-portal-v7-0#https-settings) using address and netmask length, network interface, or both. By default, ***Allowed Sources*** includes two entries: `0.0.0.0/0` and `::/0`. Delete both before adding new sources. - Locating the Portal in a DMZ, separated from other systems. - Use a unique SPA key for the Portal's [client profile](/v1/docs/configure-client-profiles-v7-0) to limit the impact of an SPA key compromise. - Do not use wildcard certificates for [proxied entitlement certificates (PKCS #12)](/v1/docs/adding-a-portal-v7-0#user-access-settings). Upload one or more certificates specific to each protected host instead. ### 23. STIG The STIG guide for Ubuntu includes many steps that further harden the appliance. Several are built into the appliance by default. Others are optional because they can negatively affect user experience or system performance. Unless you have specific compliance requirements that require these optional steps, leave the system as configured. **Action**: SSH to each relevant appliance and run `man cz-stig` to list optional STIG steps available. --- ## Summary Combining the built-in appliance hardening in AppGate ZTNA with the steps in this section produces a strong security posture. The table below summarizes the outcome of applying all measures: | Area | Outcome | | --- | --- | | Network exposure | Appliances are largely hidden on the internet with minimal DNS records and exposed ports. Except for the Portal, all internet-facing access is SPA-initiated and encrypted with ECDHE-RSA-AES256-GCM-SHA384. | | Device authentication | Only enrolled devices are authenticated. Compromised usernames and passwords alone are not sufficient for access. | | Admin access | Admin access is restricted to defined internal or management networks. Admins require MFA, receive roles with limited rights, and all actions are recorded in audit logs. | | SSH access | SSH access is restricted to internal or management networks, requires public key authentication, and uses brute-force blocking. Only `aes256-ctr`, `aes192-ctr`, and `aes128-ctr` ciphers are supported. Established SSH connections drop after a short period of inactivity. | | Client access | Client access can be restricted by source subnet and by defining allowed destination subnets for protected hosts. |