How to Create a Proxy // Squid (HTTP) and SOCKS

preview_player
Показать описание
Support Me

Get a 5% off Ekster Products
(PAID Link)

Try out ScraperAPI and program your own proxy!

Follow me on a Twitter and Facebook!

Welcome back to Dev Odyssey Home Networking! In this episode I visually explain how HTTP and Socket Secure (SOCKS5) proxies work.

In this video, I show you how to set up an HTTP and SOCKS5 proxies using Squid and Ubuntu 20.04 LTS with OpenSSH. Then we test out these proxies using Postman and FoxyProxy plugin for Firefox. Proxies have many benefits, some of which are increased anonymity browsing online, enabling access to different online content, a means to analyze web traffic, parental blocks on website, and much more. Once you know how to create and connect to proxies, your benefits are limited to your imagination.

Video Outline

00:00 Intro
00:26 What are Proxies
00:53 HTTP Proxy Explained
02:35 SOCKS Proxy Explained
03:56 Proxy Benefits Recap
04:20 Preliminary Test
05:07 Download / Configure Squid Proxy
06:33 Configure / Test Proxy In Postman
07:51 Adding Basic Auth to Squid Proxy - Update in Description
10:44 Configure / Test Proxy Auth in Postman
11:35 Configure SOCKS Proxy
12:02 Showing Open Ports
12:28 Configure SOCKS Proxy in FoxyProxy
13:21 Testing SOCKS Proxy
13:36 Outro

A Proxy server is simply an intermediary, or middle man, that processes requests for you on their way out to their destination, acting as a client itself on your behalf. There are many different proxy services and protocols, but in this case, we will be discussing the most popular, HTTP(s) and SOCKS (Socket Secure) proxies.

HTTP Proxy Diagram
SOCKS Proxy Diagram

Benefits - Similar to intro items

Increased Anonymity Browsing Online
Enable access to different content
Analyze web traffic
Parental Blocks on Websites

Demonstration

Squid Proxy
1. Install squid (sudo apt install squid)
4. Restart Squid (sudo systemctl restart squid)
5. Check if its running (sudo systemctl status squid) Should see "running" and "active"
6. Configure Proxy in Postman and test (Settings, then Proxy tab). Add IP of Proxy Server, then default port (3128)
8. Add basic user / password for authentication
1. Add the following
1. auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/htpasswd
2. auth_param basic realm Squid Proxy Caching Web Server
3. acl authenticated proxy_auth REQUIRED
4. acl authenticated_ips src {{CLIENT_IP_ADDRESS}}/32
5. http_access allow authenticated authenticated_ips

1. UPDATE: Run the following replacing “username” and accordingly:
sudo sh -c 'printf "USERNAME:$(openssl passwd -6 -salt $(openssl rand -hex 16))\n" >> /etc/squid/htpasswd
2. Restart Squid
3. Configure Postman to use Proxy Auth (Settings then Proxy). Fill in Username and Password

SOCKS Proxy
1. Login to Ubuntu Server using SSH, with -D flag for dynamic port forwarding
* Dynamic Port Forwarding. - Creates a SOCKS proxy server that allows communication across a range of ports.
2. Configure Foxy Proxy By Adding a new Proxy, then changing the type to "SOCKS5", IP Address as your localhost (127[.]0[.]0[.]1), and port you used (40932)
3. Save Configuration with name Test SOCKS. Open new tab in Firefox, set FoxyProxy to use Test SOCKS

Other Dev Odyssey Network Videos:

Home Networking Playlist

Network Security Playlist

Icon Attribution
Icons made by Freepik from Flaticon

Icons made by Vectors Market from Flaticon

Icons made by Smashicons from Flaticon

Ubuntu is a trademark of Canonical

Squid Artwork
Creative Commons — Attribution-ShareAlike 3.0 Unported — CC BY-NC-SA 3.0

Music Attribution
Creative Commons — Attribution-ShareAlike 3.0 Unported — CC BY-SA 3.0
Рекомендации по теме
Комментарии
Автор

What do you use proxies for? Curious to learn all what Squid (HTTP) Proxy or SOCKS can do?

DevOdyssey
Автор

This guy is super intelligent to explain everything in simple and easy word. Learning networking and other communication stuffs is like blindly walking into a dark room to me. I would love to get all the networking terminologies explained by him.

abdurrahmanrafi
Автор

Your channel is underrated sir. Very informative information and easily digestable. Keep up the great work!

medinarick
Автор

Well created and well presented squid proxy video.

AshishKumar-qigk
Автор

I do proxies in a cool niche way. I make a local proxy so that I can VPN using a certain application, but using the native internet for my browser. Basically I use a space computer to use as the proxy which also eliminates the need for port forwarding :) .

lextacy
Автор

amazing video thanks. Would u have aditional documentation on how to associate a clean ip range to those proxies ?

hichambelahmer
Автор

Thanks for the vid and all the info.

i am new into this and want to start hosting my own proxys for myself.

i am stucked at the begin of this video. it looks like youre using 2 different screens. 1. where you using a terminal and 2nd one your local pc or smth.

how do i get the terminal at 04:22?

lesleymiddelham
Автор

Thank you so much for your how to does Qustodio works? we use client of qustodio on the kinds laptop but do not change proxy manually. How does the client side controls laptop? I am interested for developing a parental control application and proxy server for a school.

mdsalahuddin
Автор

Great video! thanks. Just a question, you didn't have access to internet on you local computer? how did you ssh into the server? doesn't ssh need internet connection? sorry if my question is naive

behnamparsaeifard
Автор

Before you changed localnet to authenticated [...] could you have still used that as a proxy server, but that it just would allow anyone to connect to it? And replacing that iwth the authenticated [...] makes it restricted to only the ip address you want?

kimaegaii
Автор

Hi Dev, thank you for your informative video,
That means when using a rotating IP services, Is it possible to do the same process to create proxy ?

aimanesennouni
Автор

*- Very very informative and intrusting TKS FOR THAT !, the problem come from the set up Ubuntu 20.04 LTS...it's very long to start and to detect my personnal material...i can't understand why on my DELL optiplex 3020 it is so long.... is it possible to do the same work on a Centos7 or Centos8 ? or do we have to buy some space disk in the cloud to do it anyway ?

*- Does the setting-up and the using on the cloud is free for few weeks or do we have to pay quickly ?

*- if i understand deeply, the other way is maybe to setup a proxmox server between our router's provider and our computer (more secure)

tks forward++

davidbourgie
Автор

Congratulations on your video.
I have a doubt, in case to create several ipv4 and socks5 proxy with individual user and passwords, how would it look?

andersongirardi
Автор

I had the proxy working but after I set the password I started getting 403 authentication errors. I checked the conf file multiple times and I forwarded the ports in my wan setting on my router. I'm also using a windows computer without using putty because after configuring Openssh in ubuntu, I was having problems connecting to the gui version of ubuntu 20.04.

jaywilliams
Автор

can you make this process using a 4g Modem to get 4g Ip ?

djchrisnobeat
Автор

Great vid 👍 is this something I can do on an ipad which has a website blocking system so that I can access those websites? I think I need a special link to use because proxies and vpns are all blocked

Abrovk
Автор

Thanks for informative video, can I assign to the squid proxy server public IP, so it will be accessible by other devices on the internet?

deyaafattal
Автор

Hi it looks like I got this configured to work but I'm not seeing anything in the access.log. Is there anything I'm missing to why this is not printing there?

AlexanderDavila-qr
Автор

Very good video. How did squid handle SSL certificates? I didn't see any config but postman api call to https site worked. Do you disable disable SSL verification?

AykutKlc
Автор

Do not create a proxy without a proper authentication, thinking that "no body knows the IP to my server, How are they going to find out I'm running a proxy on my server and try to use it anyway". Based on my experience botnets are always running and scanning every port on every IP on internet including your server's IP, looking for vulnerabilities and they will eventually find your free and open proxy(which requires no authentication) and will use it for such things as applying DDOS attacks to their victims and whatnot. So be aware of that, and in order to prevent it, set up password for your proxy as the video suggests 07:51👍
P.S you can also use fail2ban to prevent brute force attacks which will be directed to find out the password you've set for your proxy.
BTW Dev Odyssey, Thanks for your great video man👍

sadeghhosseini