OCI: Proxy setup via Squid

squid is a handy utility to be installed on a small VM, located into a public subnet, to proxy all outbound internet accesses, for example access yum repositories on the internet.

To proceed:

#1 Provision a VM running OL7.x

This VM got the private IP


#2 Login to the VM and configure squid:

sudo yum -y update
sudo yum -y install squid
sudo firewall-cmd --add-port=3128/tcp --permanent
sudo systemctl restart firewalld.service
sudo systemctl enable squid
sudo systemctl start squid


#3 Update the security list where the proxy VM is started to allow the inbound traffic to the port 3128



#4 From the VM located in the private subnet, specify the proxy port on the proxy vm:

export http_proxy=
export https_proxy=
sudo yum -y update

or specify the following in /etc/yum.conf