Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Downloading and Running the Juniper Advanced Threat Prevention Cloud Script

The Juniper ATP Cloud uses a Junos OS operation (op) script to help you configure your SRX Series device to connect to the Juniper ATP Cloud cloud service. This script performs the following tasks:

  • Downloads and installs certificate authority (CAs) licenses onto your SRX Series device.

  • Creates local certificates and enrolls them with the cloud server.

  • Performs basic Juniper ATP Cloud configuration on the SRX Series device.

  • Establishes a secure connection to the cloud server.

  • Juniper ATP Cloud requires that both your Routing Engine (control plane) and Packet Forwarding Engine (data plane) can connect to the Internet.

  • The data plane connection should not go through the management interface, for example, fxp0. You do not need to open any ports on the SRX Series device to communicate with the cloud server. However, if you have a device in the middle, such as a firewall, then that device must have ports 8080 and 443 open.

  • The SRX Series device uses the default inet.0 routing table and an interface part of inet.0 as source-interface for control-plane connection from SRX Series device to ATP Cloud. If the only Internet-facing interface on SRX Series device is part of a routing instance, then we recommend that you add a static route pointing to the routing instance. Else, the control connection will fail to establish.

  • Juniper ATP Cloud requires that your SRX Series device host name contain only alphanumeric ASCII characters (a-z, A-Z, 0-9), the underscore symbol ( _ ) and the dash symbol ( - ).

For SRX340, SRX345 and SRX500M Series devices, you must run the set security forwarding-process enhanced-services-mode command and reboot the device before running the op script or before running the request services advanced-anti-malware enroll command.

To download and run the Juniper ATP Cloud script:


As of Junos Release 19.3R1, there is another way to enroll the SRX series device without having to interact with the ATP Cloud Web Portal. You run the “enroll” command from the SRX and it performs all the necessary enrollment steps. See Enrolling an SRX Series Device without the Juniper ATP Cloud Web Portal

  1. In the Web UI, click Devices and then click Enroll.

    The Enroll window appears. See Figure 1.

    Figure 1: Enrolling Your SRX Series DeviceEnrolling Your SRX Series Device
  2. Copy the highlighted contents to your clipboard and click OK.

    When enrolling devices, Juniper ATP Cloud generates a unique op script for each request. Each time you click Enroll, you’ll get slightly different parameters in the ops script. The screenshot above is just an example. Do not copy the above example onto your SRX device. Instead, copy and paste the output you receive from your Web UI and use that to enroll your SRX devices.

  3. Paste this command into the Junos OS CLI of the SRX Series device you want to enroll with Juniper ATP Cloud and press Enter. Your screen will look similar to the following.

    If for some reason the ops script fails, disenroll the device (see Disenrolling an SRX Series Device from Juniper Advanced Threat Prevention Cloud) and then re-enroll it.

  4. In the management interface, click Devices.

    The SRX Series device you enrolled now appears in the table. See Figure 2.

    Figure 2: Example Enrolled SRX Series DeviceExample Enrolled SRX Series Device
  5. (optional) Use the show services advanced-anti-malware status CLI command to verify that connection is made to the cloud server from the SRX Series device. Your output will look similar to the following.

Once configured, the SRX Series device communicates to the cloud through multiple persistent connections established over a secure channel (TLS 1.2) and the SRX device is authenticated using SSL client certificates.

As stated earlier, the script performs basic Juniper ATP Cloud configuration on the SRX Series device. These include:


You should not copy the following examples and run them on your SRX Series device. The list here is simply to show you what is being configured by the ops script. If you run into any issues, such as certificates, rerun the ops script again.

  • Creating a default profile.

  • Establishing a secured connection to the cloud server. The following is an example. Your exact URL is determined by your geographical region. Refer to this table.


    Customer Portal URL

    United States

    Customer Portal:

    European Union

    Customer Portal:


    Customer Portal:


    Customer Portal:

  • Configuring the SSL proxy.

  • Configuring the cloud feeds (allowlists, blocklists and so forth.)

Juniper ATP Cloud uses SSL forward proxy as the client and server authentication. Instead of importing the signing certificate and its issuer’s certificates into the trusted-ca list of client browsers, SSL forward proxy now generates a certificate chain and sends this certificate chain to clients. Certificate chaining helps to eliminate the need to distribute the signing certificates of SSL forward proxy to the clients because clients can now implicitly trust the SSL forward proxy certificate.

The following CLI commands load the local certificate into the PKID cache and load the certificate-chain into the CA certificate cache in PKID, respectively.


ssl_proxy_ca.crt (Signing certificate)

Is the SSL forward proxy certificate signed by the administrator or by the intermediate CA.


Is the key pair.


Is the certificate ID that SSL forward proxy uses in configuring the root-ca in the SSL forward proxy profile.


Is the file containing the chain of certificates.

The following is an example of SSL forward proxy certificate chaining used by the op script.

Note that you cannot enroll the SRX Series device to Juniper ATP Cloud if the SRX device is in FIPS mode due to a PKI limitation.

To check your certificates, see Troubleshooting Juniper Advanced Threat Prevention Cloud: Checking Certificates. We recommend that you re-run the op script if you are having certificate issues.