Modifying local policy file using CLI
search cancel

Modifying local policy file using CLI

book

Article ID: 419715

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

Broadcom recommends executing policy changes using Management Console, however in some cases it may be needed to allow or block access to a website using CLI. This article explains how to do it. 

Resolution

  1. Connect to Edge SWG using SSH
  2. Go to configuration mode and issue the following command:
    EdgeSWG#(config)inline policy local EOF
  3. Paste CPL code you would like apply:
    <proxy>
      url.domain=”example.com” Allow
  4. Press Enter to go to next line and type EOF

Example:

EdgeSWG#(config)inline policy local EOF
<proxy>
  url.domain=”example.com” Allow
EOF
   ok
EdgeSWG#(config)

IMPORTANT: Above procedure will overwrite existing local policy. If your local policy is not empty and you would like to add a new rule you need to paste full local policy configuration + a new rule you wish to add.

EdgeSWG#(config)inline policy local EOF
##ADD YOUR EXISTING POLICY ON TOP PORTION HERE##
<proxy>
  url.domain=”example.com” Allow
EOF
  ok
EdgeSWG#(config)