Sunday, November 8, 2020

Simple http/https proxy using squid

This is a basic proxy setup, whereby you practically does not have to do any settings.

First, install squid in our machine with address

# yum install squid -y

Then, start squid service

# systemctl start squid

By default squid runs on port, 3128, so we will allow 3128/tcp on our firewall

# firewall-cmd --add-port 3128/tcp

# firewall-cmd --add-port 3128/tcp --permanent

Now the time to test out our proxy, in a different machine. This test machine does not have any internet connection to the outside world, except network connection to our proxy server.

First we use curl to try to reach without proxy

$ curl

curl: (6) Could not resolve host:

Next we will use curl with our brand new proxy. We can see that our machine is able to reach, with the help of the proxy.

$ curl --proxy

Nice, happy proxying.

No comments: