Home

How to enable a proxy for your agent

Instructions for Linux Agent | Unix Agent | MacOS Agent | Windows Agent

 

Linux/BSD/Unix Agent - How to enable proxy

Good to Know By default the Linux/BSD/Unix Agent will operate in non-proxy mode. The agent can be configured to use an HTTPS or HTTP proxy for internet access.

How to enable your proxy The agent can be configured in one of these ways:

1) /etc/sysconfig/qualys-cloud-agent - applicable for Cloud Agent on Linux/Unix (.rpm)

2) /etc/default/qualys-cloud-agent - applicable for Cloud Agent on Linux (.deb)

3) /etc/environment - applicable for Cloud Agent on Linux (.deb) and Linux/Unix (.rpm)

4) /usr/local/etc/qualys-cloud-agent - applicable for Cloud Agent on BSD (.txz)

Tip - Option 3) is a better choice for Linux/Unix if the systemwide proxy will be used by the agent.

Tell me the stepsTell me the steps

Here are the steps to enable the Linux agent to use an HTTPS proxy for communication with our cloud platform:

1) if /etc/sysconfig/qualys-cloud-agent file doesn't exist create it

2) add one of the following lines to the file:

https_proxy=https://[<username>:<password>@]<host>[:<port>]

or:

qualys_https_proxy=https://[<username>:<password>@]<host>[:<port>]

where <username> and <password> are specified if the https proxy uses authentication. If special characters are embedded in the username or password (e.g. @, :, $) they need to be url-encoded. where <host> is the proxy server's IPv4 address or FQDN. where <port> is the proxy's port number.

If the proxy is specified with the https_proxy environment variable, it will be used for all commands performed by the Cloud Agent. If the proxy is specified with the qualys_https_proxy environment variable, it will only be used by the Cloud Agent to communicate with our cloud platform.

3) change the permissions using these commands (not applicable for BSD/Unix):

Linux (.rpm)
chown root /etc/sysconfig/qualys-cloud-agent
chmod 600 /etc/sysconfig/qualys-cloud-agent

Linux (.deb)
chown root /etc/default/qualys-cloud-agent
chmod 600 /etc/default/qualys-cloud-agent

4) restart qualys-cloud-agent service using the following command:

Linux/BSD:

service qualys-cloud-agent restart

Unix:

/opt/qualys/cloud-agent/bin/qcagent.sh restart

 

MacOS Agent - How to enable proxy

Good to Know Qualys proxy configured in the .../QualysCloudAgent/Config/proxy file will take preference over any proxies set in System Preferences (including Automatic Proxy, Web Proxy (HTTP), or Secure Web Proxy (HTTPS)).

Tell me the steps