Using a proxy with Corelight-update¶
If the Corelight-update host requires use of a network proxy to access, download, or push content to devices, you can configure the Corelight-update host service or user session to provide the proxy location using the operating system (OS) environment variables: HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions thereof).
HTTPS_PROXY takes precedence over HTTP_PROXY for https requests.
Update the service definition¶
When running Corelight-update as a service, it will automatically use the HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions thereof) OS environment variables when set. The proxy location can be added to the service definition.
Update the service definition using override.conf.
Use
systemctlto create an override.conf.$ sudo systemctl edit corelight-update.service
Create a
[Service]section in theoverride.conf, and set theHTTPS_PROXYenvironment variable. For example:[Service] Environment="HTTPS_PROXY=https://proxy.example.com:443"
Save the changes. You can review the
override.confin the path/etc/systemd/system/corelight-update.service.dReload systemd.
$ sudo systemctl daemon-reload
Restart the Corelight-update service.
$ sudo systemctl restart corelight-update
Defining the proxy environment for the Corelight-update service will not apply the proxy settings to individual users on the Corelight-update host. If you plan to run and test Corelight-update with a user account, you can set the OS proxy environment variables at the user level or apply them at the host level.
Update the user environment¶
The options to set a proxy can vary based on the OS distribution being used. Corelight-update will automatically use the HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions thereof) environment variables when set.
For user accounts, update the user’s shell profile to set the proxy. For example:
$ sudo vi /etc/profile
export https_proxy="https://proxy.example.com:443"
export HTTPS_PROXY="https://proxy.example.com:443"
export NO_PROXY="fleet,localhost,corelight.com"
You can also set the proxy environment variables at the host level.
In Red Hat, update
/etc/profileto set the proxy at the host level for users.In Ubuntu, update
/etc/environmentto set the proxy at the host level for users.