Configuring a Squid proxy server
As an administrator, you can set up a forward proxy server in your infrastructure environment so that PATROL Agent can communicate with BMC Helix Operations Management via the proxy server.
To configure a Squid proxy server as a Docker container without authentication support
- Log in to the computer on which you plan to configure the Squid proxy server.
Update the apt package index by running the following command:
apt-get updateInstall the package to enable apt to use a repository over HTTPS by running the following command:
apt-get install apt-transport-https ca-certificates curl software-properties-commonAdd Docker's official GPG key by running the following command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -Update the registry by running the following command:
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"Install the Docker engine by running the following command:
apt-get update
apt-get install docker-ceVerify that Docker CE is installed correctly by running the hello-world image:
docker run hello-worldExtract the Docker image of the Squid proxy server from the Docker repository:
#Syntax
docker pull <Squid docker image name>
#Example
docker pull sameersbn/squid:3.5.27-2- Download the conf file and copy it to the /opt/tmp/ directory.
Using a text editor, open the /opt/tmp/squid.conf file, and update the http_access parameter. By default http_access is set to deny all. Change it to allow all.
http_access allow allStart the Docker container by running the following command:
docker run --name squid -d --restart=always --publish 3129:3128 --volume /opt/tmp/squid.conf:/etc/squid/squid.conf --volume /srv/docker/squid/cache:/var/spool/squid sameersbn/squid:3.5.27-2Verify that the Docker container is running by using the following command:
docker psUpdate the PATROL Agent configuration to add the proxy server details as shown in the following example. For details, see Configuring-PATROL-Agents-to-support-a-forward-proxy-server.
#Example
PATROL_CONFIG "/AgentSetup/integration/forwardProxyServer" = {REPLACE = "testmachine.bmc.com:3128"}
To configure a Squid proxy server as a Docker container with local authentication support
- Log in to the computer on which you plan to configure the Squid proxy server.
Update the apt package index by running the following command:
apt-get updateInstall the package to enable apt to use a repository over HTTPS by running the following command:
apt-get install apt-transport-https ca-certificates curl software-properties-commonAdd Docker's official GPG key by running the following command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -Update the registry by running the following command:
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"Install the Docker engine by running the following command:
apt-get update
apt-get install docker-ceVerify that Docker CE is installed correctly by running the hello-world image:
docker run hello-worldExtract the Docker image of the Squid proxy server from the Docker repository:
#Syntax
docker pull <Squid docker image name>
#Example
docker pull sameersbn/squid:3.5.27-2Install the apache2-utils utility to manage credentials:
sudo apt-get install apache2-utils- Create a directory named squid in the /etc directory.
Create a password file named passwd under /etc/squid, and change the ownership:
sudo touch /etc/squid/passwd
sudo chown proxy: /etc/squid/passwdAdd a new user to the Squid server.
sudo htpasswd /etc/squid/passwd testuserThe command prompts you to enter a password for the new user.
- Download the conf file and copy it to the /opt/tmp directory.
- Rename the squid_auth.conf file to squid.conf.
Start the Docker container by running the following command:
docker run --name squid -d --restart=always --publish 3129:3128 --volume /opt/squid.conf:/etc/squid/squid.conf --volume /srv/docker/squid/cache:/var/spool/squid sameersbn/squid:3.5.27-2Verify that the the Docker container is running by using the following command:
docker psUpdate the PATROL Agent configuration to add the proxy server, user and password details as shown in the following example. For details, see Configuring-PATROL-Agents-to-support-a-forward-proxy-server.
#Example
PATROL_CONFIG "/AgentSetup/integration/forwardProxyServer" = {REPLACE = "testmachine.bmc.com:3128"}
PATROL_CONFIG "/AgentSetup/integration/forwardProxyUser" = {REPLACE = "testuser"}
PATROL_CONFIG "/SecureStore/mca/tenant/forwardProxyPasswd" = {MCA/<forwardProxyPasswd>}
To configure a Squid proxy server with LDAP authentication support
Get the following details from the LDAP administrator:
- Organizational Unit (OU)
- Domain Component (DC)
- Common Name (CN)
- Log in to the computer on which you plan to configure the Squid proxy server.
- Download the file. Copy it to the $SQUID_HOME\etc\squid directory after you configure the squid proxy server.
- To store the password of the LDAP account, create a file named ldap_password.txt under the $SQUID_HOME\etc\squid directory.
- Restart the squid proxy service.
To add the proxy server connection details, update the PATROL Agent configuration as shown in the following example.
For details, see Configuring-PATROL-Agents-to-support-a-forward-proxy-server.#Example
PATROL_CONFIG "/AgentSetup/integration/forwardProxyServer" = {REPLACE = "testmachine.bmc.com:3128"}
PATROL_CONFIG "/AgentSetup/integration/forwardProxyUser" = {REPLACE = "testuser"}
PATROL_CONFIG "/SecureStore/mca/tenant/forwardProxyPasswd" = {MCA/<forwardProxyPasswd>}- Restart the PATROL Agent.
- To verify if the PATROL Agent is communicating with BHOM via the squid proxy server, go to the PatrolAgent-<hostname>-<port>.errs log file and search for the PATROL Agent guid.
The log file is present in the following directory:
- (Linux): $PATROL_HOME/../log
- (Windows): %PATROL_HOME%log