--- title: "Adding Ports to a Whitelist Using the CLI" slug: "adding-ports-to-a-whitelist-using-the-cli" tags: ["Product Usage", "EX 11.x", "FX 11.x", "AX 11.x", "NX 11.x", "Network Security"] updated: 2026-09-12T20:42:33Z published: 2026-09-12T20:42:33Z canonical: "docs.trellix.com/adding-ports-to-a-whitelist-using-the-cli" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Adding Ports to a Whitelist Using the CLI Use the CLI commands in this procedure to add a port to a whitelist. You enter each port separately. You can add up to 256 port whitelist entries. > [!WARNING] > Important > > After you add a port to a whitelist, use the `policymgr refresh-policy` command in the CLI configuration mode to refresh the policy configuration. > > Make sure the port whitelist is enabled after you have added the ports to the whitelist. For details about how to enable a port whitelist, [Enabling or Disabling a Port Whitelist Using the CLI on page 1](/network-and-platform/docs/enabling-or-disabling-a-port-whitelist-using-the-cli). **To add ports to a whitelist:** 1. Go to CLI configuration mode. `hostname > enable hostname # configure terminal` 2. Specify the port to add to a whitelist. `hostname (config) # policymgr whitelist port <port_number>` 3. Repeat the previous step for each port you want to add. 4. Save your changes. `hostname (config) # write memory` 5. Refresh the policy configuration. `hostname (config) # policymgr refresh-policy` 6. Verify the configuration for a port whitelist. `hostname (config) # show policymgr whitelist port` ### Example This example shows how to add three ports to a whitelist. `hostname (config) # policymgr whitelist port 443` `hostname (config) # policymgr refresh-policy` `hostname (config) # policymgr whitelist port 8080` `hostname (config) # policymgr refresh-policy` `hostname (config) # policymgr whitelist port 9000` `hostname (config) # policymgr refresh-policy` `hostname (config) # show policymgr whitelist port` `Port Based whitelist enabled: yes` `Port Whitelist Entries: 3 / 256` `Subnetf port whitelist detail:` `port 1: 443` `port 2: 8080` `port 3: 9000`