Set Up Simple Squid Proxy Server – Ubuntu

Squid refers to proxy server software that performs the role of a cache and, among other functions, works as intermediate between a client and their web server. One of the most common uses of Squid caching is to improve a web server’s performance by caching requested content and thus reducing bandwidth usage, not forgetting that it supports features such as content filtering. Squid is widely used for speeding up web requests and controlling access to web resources in networks.

Let’s dive in to the steps.

Install squid server

Configuration

Make a copy of original config file before editing

Edit /etc/squid/squid.conf to add Access Control

Add below command at the bottom of TAG: acl section to allow the only the users within the below IP address cidr

fortytwo_network is just a name replace it with your desired one

Then add the following to the top of TAG: http_access section

You can uncomment #http_access allow localnet under TAG: http_access section If you’re setting proxy only for local computer, you can skip previous 2 steps if you’re doing so.

Save file and Restart server for the changes to take place

Now add Proxy ip address and port to computer settings manually

Enter your ip address and port number as shown, 3128 is the default port as we didn’t change it here.

Then check logs and try sending requests check if it goes through your proxy server

If you’re successful you must see something like:

Visit Ubuntu Official Documentation on squid server for more advanced configurations.

We value your input. Share your thoughts or ask questions by leaving a comment.

Umar Arafath

Hey there! I'm Umar Arafath, the face behind unofficialmentor, a passionate Software Engineering undergraduate diving into the IT industry. Even though my formal title may be a student, my heart lies in the field of DevOps. I share my daily learning adventures in this blog so it'll help me remember stuff. It's a win-win end of the day, I reinforce my knowledge, and you learn something new. Please be kind enough to leave a comment! Your feedback fuels my growth. Away from the desk, catch me on the cricket field or badminton court, polishing my physique. I'm also a motorbike enthusiast, who finds riding as a healing spell for my inner peace.

Leave a Reply

Your email address will not be published. Required fields are marked *