We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda CloudGen Firewall

Public Cloud Provisioning Command Line Tools

  • Last updated on

The following command-line tools are available to automate configuration tasks during deployment of your CloudGen Firewall.

  • getpar
  • cloud-restore-license
  • create-dha
  • editconf
  • cloud-setmip
  • cloud-enable-webui
  • cloud-enable-ssh

Retrieving PAR files from a Firewall Control Center

Use this command to retrieve PAR files from a Control Center during provisioning. For PAYG firewalls, the licenses are pushed to the Control Center before fetching the configuration.

Usage: getpar -a [CC IP address] -c [clustername] -r [range id number] -b [firewall name]

  • -a|--address [address] – Control Center IP address.
  • -u|--username [username] – CC admin user used to connect to the Control Center.
  • -c|--cluster [cluster] – Cluster name.
  • -r|--range [range] – Range number.
  • -b|--boxname [boxname] – Firewall name. 
  • -d|--destination [dest] – Destination directory and filename for the PAR file. E.g., /opt/phion/update/box.par
  • -s|–spoe – Use Single Point of Entry to connect to the Control Center.
  • -l|--pushlic auto|always|never – Configures if the licenses should be pushed to the Control Center before retrieving the PAR file. For PAYG firewalls, the license must be pushed to the Control Center.

For more information, see How to Modify CloudFormation Templates to Retrieve the PAR File from a Control Center.

Restore the Auto-Generated License on a PAYG Firewall

When you restore a PAYG-licensed firewall in the cloud using a PAR file from another PAYG instance, the license's files are overwritten with the licenses in the PAR file, resulting in an unlicensed firewall. By running this CLI command after restoring from a PAR file, the PAYG license generated during provisioning is restored, thereby overwriting the existing license. This allows the admin to automatically restore a PAYG unit from a PAR file without having to back up and restore the license manually. 

Usage: cloud-restore-license

Available parameters:

  • -f – force license overwrite.
  • -h – print this help and exit.

Create a High Availability Cluster

Execute this command on the primary firewall to create a high availability cluster via the command line. You are prompted for the password for the other firewall. If the secondary firewall is running in the public cloud, you must disable enforcing a password change on the secondary firewall by adding the following editconf commands to the provisioning / user data scripts: 

Usage: /opt/phion/bin/create-dha  -s [virtual server name] -c -o [IP address of other firewall] -g [IP address for default gateway used by the other firewall]

/opt/phion/bin/editconf -f /opt/phion/config/active/boxadm.conf -p RPASSWDENFORCE -v 0
/opt/phion/bin/editconf -f /opt/phion/config/configroot/boxadm.conf -p RPASSWDENFORCE -v 0

If you want to use the create-dha tool for devices in two different subnets in the Google Cloud, you must upgrade to 8.0.1 or higher.

Available parameters:

  • -u|--username [username] – Specify username for connecting to the secondary firewall (default: root).
  • -o|--other-ip [address] – IP address of the secondary firewall. 
  • -g|--other-gw [address] – IP address of the default gateway for the subnet in which the secondary firewall is running.
  • -n|--other-netmask [CIDR netmask] – CIDR mask of the subnet in which the secondary firewall is running
  • -s|--server [server name] – (Optional) Specify the virtual server name used for the high availability cluster.
  • -c|–cleardirty – Clear the dirty download flag after setting up the high availability cluster.
  • --verbosity [verbosity] – Enable command-line logging and set verbosity to the specified level.
  • --fullcolortrace – Enable colored command-line logging.

For more information on high availability, see High Availability.

Insert or Edit a Configuration Parameter

In some cases, you may be required to edit a configuration parameter. For example, you need to disable enforcing a password change on first login when pairing a high availability cluster via create-dha.

Usage: editconf  -f [/absolutepath/file.conf] -p [parameter to set] -v [value for the parameter]

  •  -f|--file [input config file, absolute path] – Absolute path to the configuration file.
  • -p|--put [key to set in the config file] – Set a configuration parameter. Requires value to also be set.
  • -d|--delete [key to delete] – Delete a configuration parameter.
  • -D|--delete-section – Remove the entire section from the configuration file.
  • -v|–value [value content] – Value to add to the configuration file.

Change a Dynamic to a Static IP Management IP Address

Convert the management IP address on a dynamic interface to a static configuration. If no gateway or subnet is entered, these values are derived from the management IP address. In this case, the gateway is set to the first IP address in the subnet.

usage: cloud-setmip [management IP] [subnet in CIDR format] [default gateway IP address]

Enable the Web Interface on Public Cloud Firewalls

The web interface is disabled automatically if user data scripts are used in the template. To manually re-enable the web interface, use /opt/phion/bin/cloud-enable-webui

Usage: /opt/phion/bin/cloud-enable-webui

Enable SSH Access on Public Cloud Firewalls

By default SSH access for the root user is disabled for firewalls running in the public cloud. You can re-enable SSH via cloud-enable-ssh

Usage: cloud-enable-ssh

Microsoft Azure Virtual WAN Connection

Use the commands presented here to establish a connection to Microsoft Azure Virtual WAN manually via a commend-line interface script. The script will also start the connection daemon.

Usage: /opt/phion/bin/connectToAzureVWAN [tenant_id] [client_id] [client_secret] [subscription_id] [ng_user] [ng_password] [vwan_name]

If the daemon was killed for whatever reason, you must restart it. The input values are handed over to the daemon directly by \n[value] arguments.

Usage: echo "[tenant_id]\n[client_id]\n[client_secret]\n[subscription_id]\n[ng_user]\n[ng_password]\n[resource_group]\n[vwan_name]\n[site_id]" | /opt/phion/bin/azureVWANDaemon

Last updated on