Proxy types and how it works
Hello Medium!! I always missed understanding the way proxies are used, however, the definition is so simple but people still miss understand how they are used and each time they made me unsure of the knowledge I have. So once and for all we will go together through all the proxy types and we will understand how they are used. And if anyone judges your knowledge send him that article.
At first, I thought that proxies are difficult to understand and I didn’t even imagine that I will handle them one day and to be honest after my research I just find out that they are so easy to understand, in this article we will go through the following parts:
- What is a proxy and why we use it?
- What is a private proxy?
- Type of proxy servers
- Proxies for protocols
What is a proxy and why we use it?
We can simply define a proxy server as an intermediate machine between two peers that can handle the traffic in a different way, where it can edit it, redirect it, block it or simply drop it.
We can use a proxy for different reasons:
- To protect our internal network using network rules and policy and in that way the proxy act as a FW.
- To hide the internal network from the internet, here it acts like Router.
- Control if there is any leak of data.
- Divert traffic, it can work as a load balancer as it can also redirect traffic.
In the next parts, we will better understand what is proxy because even after this part I still didn’t get it.
What is a private proxy?
Before I go through the types of proxy I want to clarify what is a private proxy, by private proxy we mean a proxy that we use internally in our network for different reasons.
Usually, when we talk about private proxies we would establish the following objectives:
- Data can be shown that it’s coming from different IP addresses to hide the real one form attacker miss use.
- Filter out content going in and out where it should follow a well-precise policy, the proxy also collects all the logs of websites visited, and that provides good traceability for the security team.
- Proxy cache the data often visited to provide fast access.
- Examine packet headers and payload to track any social media access so it can easily be restricted.
Type of proxy servers
For sure you heard about to types of proxy normal proxy and reverse proxy, in this part we will discover a lot of proxy that you didn’t even think they exist 😜. For each proxy, we will understand why they are used.
In the case of different websites on different servers, the reverse proxy listens to the request and redirects the traffic to the appropriate server. The proxy also restricts the access of the client to sensitive data on the same server.
The most known one where we usually call it “proxy”, can block certain access to the web page, it works between the client and the webserver, it intercepts the traffic, and can change the IP to mask it.
The request is the same as the HTTP request, only URL is passed instead of a path. The request is sent to which web proxy responds.
Web proxies forward HTTP requests. The request from the client is the same as a regular HTTP request except the full URL is passed, instead of just the path.
GET https://en.wikipedia.org/wiki/Proxy_server HTTP/1.1
Proxy- Authorization: Basic encoded-credentials Accept: text/html
This request is sent to the proxy server, the proxy makes the request specified and returns the response.
HTTP/1.1 200 OK Content-Type: text/html; charset UTF-8
They are not anonymous and their original IP can be detected easily, usually are used as a cache server to provide a fast service, such proxy is used by some ISP in the world.
I am sure that at some point you got a fast reply from a server that usually takes some extra ms to respond.
Proxy servers combined with gateway redirect the traffic to the webserver, this redirection can be detected on the HTTP headers. This proxy intercepts the HTTP request and don’t change it, it mainly works as a gateway and authenticates the communications. These proxies are highly used to not say always used to protect the internal servers from DOS attacks and apply the policy of the company on each packet.
That proxy intention is to provide more accessibility. It’s a type of proxy that you use using your browser, where you have a search bar on a web page and from there you can browse the internet to provide anonymous surfing.
Each CGI proxy has its’ own policy and usually uses VPN, such proxies provide a sandbox environment.
One of the good things that it provides full web security where you can do different things without suffering web attacks and can go to some websites that you may be restricted to visit, I usually use it for malware analysis.
Some company has their own proxies and other companies provide that type of proxies as a service.
It’s is an intermediate that uses ISP real IP addresses with physical devices (endpoint devices).
Those devices connect to their target using those IP addresses and all of those devices related to the same ISP usually rotate IPs between each other. So the target will never know the end-user.
The IP usually changes each 24H, with some ISP the user will able to rotate his IP whenever he wants. Any residential proxy can only use IPs allocated for him and what the target can know is only the region of the origin request.
That proxy doesn’t have an original IP address but still can be detected, those used to protect the user, filter the traffic, and cache it.
Tor Onion proxy
This proxy provides user anonymity for its users, it routes the traffic through different nodes to render the tracking of the original request of the user impossible to detect. As you know through the transmission the packet goes through different encryption layers. Those proxies use the Tor network.
I2P Anonymous proxy
Same as Tor but it’s is more sophisticated on the scale of encryption, it uses different worldwide nodes and provides a proxy for all the protocols. Those proxies provide full anonymity to secure the user data. Those proxies use the Garlic routing technique.
Garlic routing is a variant of onion routing that encrypts multiple messages together to make it more difficult for attackers to perform traffic analysis and to increase the speed of data transfer. [Sopurce Wikipedia]
High Anonymity Proxy
Those servers totally hide the original IPs and change their IP once they are detected as a proxy server, it’s for you to guess for which reason they are used 😮
This type of proxy append the proxy name to the URL you are visiting to bypass web filters, this proxy also provides web caching but it is not used a lot due to the advanced web filtering tools.
This server identifies itself as a proxy and makes an incorrect original IP address available through the packet header.
Proxies for protocols
Some provide are used for specific protocols or they function using some specific protocols as follows:
Provides a connection to particular servers. It forwards arbitrary data after a connection phase. That type of proxy initiates a TCP connection to exchange data with a server and it’s used because the internal network is not able to create a TCP socket with an external service for security reasons.
This type of server stores the FTP connection and it’s used as a relying point, where it applies different rules, mainly its intention is to control the incoming traffic.
This proxy is used to process the one-way requests to the web page and control the incoming requests.
It’s a proxy for DNS, so simple right 👅. It forwards the DNS request to a DNS server and forward the reply to the user, that server has its own NDS cache.
It’s a remote SSH server that creates an SSH tunnel with the client to secure all the communication that the proxy will do on behalf of the client.
There is a lot of different proxies, usually, we only use some of them but at that point everything is clear and I am able to create my own vision about proxies and understand how they work in that way.
I hope that you enjoyed that article let me know by clapping so I can go deeper next time and we talk about more functions that the proxy can provide.
SLAP! a CLAP and have a good day see you sO.On ❤