Deploying Connectware Behind a Corporate Proxy
Configure system, Docker, and Connectware proxy settings for deployment behind corporate proxies.
Deploying Connectware in environments where Internet access is controlled via a corporate proxy requires additional configuration. This guide outlines the steps necessary to install and run Connectware in such environments, covering system, Docker, and application-level proxy settings.
Prerequisites
To follow this guide, you will need the following:
A valid Connectware license.
Docker and Docker Compose installed on your system.
Proxy Behavior Across Applications
Proxy configuration across applications can vary:
Some tools recognize
http_proxy
,https_proxy
, andno_proxy
(lowercase).Others may use
HTTP_PROXY
,HTTPS_PROXY
, andNO_PROXY
(uppercase).Some software may require both or use custom proxy settings.
General recommendations:
Set both lowercase and uppercase variants of proxy variables.
Avoid IP addresses unless known to be used directly by the application.
Hostname resolution may fail under proxy settings unless explicitly configured.
Configuration
Verifying Host and Proxy Server Reachability
To confirm connectivity:
uname -a
ping -c 1 your-proxy-ip
Expected output should confirm that the proxy server is reachable with minimal latency and no packet loss.
System-Wide Proxy Configuration
To apply proxy settings system-wide:
Create a script that will contain your proxy settings. The
/etc/profile.d directory
contains shell scripts that are likely to be executed at launch of your shell.
$ sudo nano /etc/profile.d/proxy.sh
export http_proxy="http://<proxy-ip>:<port>/"
export https_proxy="http://<proxy-ip>:<port>/"
export no_proxy="127.0.0.1,localhost"
export HTTP_PROXY="http://<proxy-ip>:<port>/"
export HTTPS_PROXY="http://<proxy-ip>:<port>/"
export NO_PROXY="127.0.0.1,localhost"
Make the script executable:
sudo chmod +x /etc/profile.d/proxy.sh
Restart the shell or re-login to apply. You can verify with the following:
$ env | grep -i proxy
Preserving Proxy Settings for Sudo
To retain proxy variables for commands executed with sudo
:
Edit your configuration for sudo.
sudo nano /etc/sudoers.d/env_keep_proxy
Add the following:
Defaults env_keep += "http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY"
APT Proxy Configuration
For Debian-based systems, APT requires its own proxy settings. This is not required for running Connectware. However, without it you are not able to install any software using APT.
sudo nano /etc/apt/apt.conf.d/80proxy
Acquire::http::proxy "http://<proxy-ip>:<port>/";
Acquire::https::proxy "http://<proxy-ip>:<port>/";
Acquire::ftp::proxy "http://<proxy-ip>:<port>/";
This allows software installation via APT behind the proxy.
Docker Daemon Proxy Setup
The Docker daemon requires proxy configuration to pull images from the Internet:
Create the drop-in directory:
sudo mkdir -p /etc/systemd/system/docker.service.d
Create the config file:
sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
Add the following:
[Service]
Environment="HTTP_PROXY=http://<proxy-ip>:<port>/"
Environment="HTTPS_PROXY=http://<proxy-ip>:<port>/"
Environment="NO_PROXY=localhost,127.0.0.1"
Apply the changes and restart:
sudo systemctl daemon-reload
sudo systemctl restart docker
Verify the configuration:
sudo systemctl show --property=Environment docker
Test Docker image pull:
docker pull hello-world
The result should look like this:
Using default tag: latest
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:10d7d58d5ebd2a652f4d93fdd86da8f265f5318c6a73cc5b6a9798ff6d2b2e67
Status: Downloaded newer image for hello-world:latest
docker.io/library/hello-world:latest
Container-Level Internet Access
Internet access from within containers can be configured globally or per container.
To define global proxy settings for all containers:
mkdir -p ~/.docker
nano ~/.docker/config.json
Example
{
"proxies": {
"default": {
"httpProxy": "http://<proxy-ip>:<port>/",
"httpsProxy": "http://<proxy-ip>:<port>/",
"noProxy": "127.0.0.1,localhost,admin-web-app,auth-server,broker,container-manager,connectware,ingress-controller,postgresql,protocol-mapper,service-manager,system-control-server,workbench"
}
}
}
This ensures Connectware containers can communicate with each other without proxy interference.
Configuring the Connectware Environment File
Before launching Connectware, set the proxy in the environment configuration file. By default, the environment file is located in your installation directory.
sudo nano /opt/connectware/.env
Add the following:
# Proxy Configuration
CYBUS_PROXY=http://<proxy-ip>:<port>/
CYBUS_NO_PROXY=
Make sure the .env
file is located in the correct installation directory to take effect.
Last updated
Was this helpful?