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.
Options
The Cloud Agent can be configured in one of these ways:
/etc/sysconfig/qualys-cloud-agent
- applicable for Cloud Agent on Linux (.rpm)/etc/default/qualys-cloud-agent
- applicable for Cloud Agent on Linux (.deb)/etc/environment
- applicable for Cloud Agent on Linux (.rpm), Linux (.deb)./usr/local/etc/qualys-cloud-agent
- applicable for Cloud Agent on BSD (.txz)
Option 3) is a better choice for Linux/Unix if the system-wide proxy will be used by the Cloud Agent.
Tell me the stepsTell me the steps
Here are the steps to enable the Linux agent to use a proxy for communication with our cloud platform:
- If the
/etc/sysconfig/qualys-cloud-agent
file doesn't exist, create it. - 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.
<host> is the proxy server's IPv4 address or FQDN.
<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 thequalys_https_proxy
environment variable, it will only be used by the Cloud Agent to communicate with our cloud platform. - 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 - 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)).