Configure proxy for Gateway Manager connections
Itential Automation Gateway (IAG) supports routing connections to Gateway Manager through HTTP/HTTPS proxy servers. This is useful in enterprise environments where direct internet access is restricted and all outbound connections must go through a corporate proxy.
When you enable proxy support, IAG establishes a secure WebSocket connection (wss://) to Gateway Manager through your configured proxy server using the HTTP CONNECT tunneling method. IAG establishes the TLS connection after the proxy tunnel, which ensures end-to-end encryption.
This topic covers the connect proxy, which routes IAG’s outbound control-plane connection to Gateway Manager. This is separate from the per-request proxy used for integration HTTP requests, which is configured in Admin Essentials. For more information, see Gateway configuration.
Supported proxy types
Configuration methods
You can configure proxy settings using three methods, listed here in order of precedence:
- Environment variables (highest priority)
- Configuration file
- System proxy environment variables (fallback)
Method 1: IAG environment variables
Set the following environment variables:
For more information, see Connect variables.
Method 2: Configuration file
Add proxy settings to your IAG configuration file (~/.gateway.d/gateway.conf or /etc/gateway/gateway.conf):
Method 3: System environment variables (fallback)
If you don’t provide explicit proxy configuration, IAG checks the standard system proxy environment variables:
IAG checks HTTPS_PROXY first because it uses secure WebSocket connections (wss://).
Authentication
Basic authentication
IAG supports HTTP Basic Authentication for proxy servers. You can provide credentials in two ways.
Option 1: Separate username and password
Option 2: Embedded in proxy URL
Credentials in the URL take precedence over separate username and password settings.
Security best practices
- Prefer environment variables. Store proxy credentials in environment variables rather than configuration files to avoid committing secrets to version control.
- Set file permissions. If you must store credentials in a configuration file, set proper file permissions:
- Use a secrets management system. In production environments, use a secrets management system (such as HashiCorp Vault or AWS Secrets Manager) to inject proxy credentials as environment variables.
Configuration examples
Example 1: Unauthenticated proxy
Example 2: Authenticated proxy with environment variables
Example 3: Authenticated proxy with a configuration file
Create /etc/gateway/gateway.conf:
Then start IAG:
Example 4: System proxy settings
If your system already has proxy environment variables configured, IAG uses them automatically:
Verification
To verify that IAG loaded your proxy configuration correctly, run:
Look for the connect_proxy_url field in the output. The output displays the proxy username but redacts the password for security.
Troubleshooting
Connection failures
Issue: IAG fails to connect to Gateway Manager.
Steps to diagnose:
-
Verify that the proxy server is reachable:
-
Check the IAG logs for proxy-related errors:
-
To rule out TLS certificate issues, temporarily enable insecure TLS:
Authentication failures
Issue: You see an error message that mentions “407 Proxy Authentication Required.”
Steps to resolve:
- Verify that your credentials are correct.
- Check whether special characters in the password need URL encoding.
- Try providing credentials in URL format:
http://user:pass@proxy:8080.
Proxy refuses connection
Issue: You see an error message that mentions “403 Forbidden” or “connection refused.”
Possible causes:
- The proxy doesn’t allow the CONNECT method to the destination host or port.
- The proxy policy blocks the destination host.
- The proxy doesn’t authorize the source IP.
Steps to resolve:
- Contact your network or proxy administrator to add Gateway Manager hosts to the allowlist.
- Confirm that the proxy allows the CONNECT method to port 443.
TLS certificate issues
Issue: You see certificate verification errors.
IAG validates the Gateway Manager certificate, not the proxy certificate. The proxy acts as a transparent tunnel for the TLS connection.
Steps to resolve:
- Make sure your system CA certificates are up to date.
- Verify that the Gateway Manager certificate is valid.
- If you use a custom CA, configure
GATEWAY_APPLICATION_CA_CERTIFICATE_FILE.