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
systemctl
to create an override.conf.
$ sudo systemctl edit corelight-update.service
Create a
[Service]
section in theoverride.conf
, and set theHTTPS_PROXY
environment variable. For example:
[Service] Environment="HTTPS_PROXY=https://proxy.example.com:443"
Save the changes. You can review the
override.conf
in the path/etc/systemd/system/corelight-update.service.d
Reload systemd.
$ sudo systemctl daemon-reload
Restart the Corelight-update service.
$ sudo systemctl restart corelight-update
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.
In general, you can set the proxy environment variables at the host and user level.
In Red Hat, update
/etc/profile
to set the proxy at the host level for users.In Ubuntu, update
/etc/environment
to set the proxy at the host level for users.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"