What Actually Happens When Traffic Passes Through a Proxy

Опубликовано: 15 Май 2026
на канале: Netsechub Animated Videos
74
3

“In today’s video, let’s understand forward proxy in complete detail — not just what it is, but what actually happens at the IP and port level when you use it.”

“When a user accesses the internet normally, without any proxy involved, the communication is very direct. Your system sends a request straight to the destination server. In that request, the destination IP address is the actual server’s IP, and the destination port is typically 80 if it’s HTTP or 443 if it’s HTTPS. Your operating system assigns a random source port, and the connection is established directly between your machine and the server.”

“So if you open Wireshark and capture packets in this scenario, you will clearly see your machine communicating directly with the server’s IP on port 80 or 443. There is no intermediary involved.”

“Now let’s introduce a forward proxy, and this is where things get interesting.”

“The moment you configure a proxy on your client machine, your system stops talking directly to the internet. Instead, it sends all requests to the proxy server first. This completely changes what you see at the network level.”

“If you now capture packets in Wireshark, you will no longer see traffic going to the actual server IP. Instead, you will see that your system is sending traffic to the proxy server’s IP address. And more importantly, it is not going to port 80 or 443 — it is going to a dedicated proxy port, something like 8080, 3128, or sometimes even 8000 depending on how the proxy is configured.”

“So from your system’s perspective, the proxy is the destination.”

“At this point, a lot of people assume the proxy simply forwards packets, but that’s not how it works. The proxy actually creates a completely new connection.”

“When your request reaches the proxy on, let’s say, port 8080, the proxy first analyzes the request. It can inspect the payload, apply security rules, filter traffic, log activity, or even block the request entirely. Only after this analysis does the proxy initiate a second connection to the actual destination server.”

“This second connection is a fresh TCP connection, independent of the first one. In this connection, the proxy now acts as the client.”

“So the flow now looks like this in reality: your machine connects to the proxy on a proxy-specific port like 8080, and then the proxy connects to the actual server on standard ports like 80 or 443.”

“If you visualize this clearly, there are two separate connections happening.”

“In the first connection, your system might use a random source port and connect to the proxy’s IP on port 8080. In the second connection, the proxy uses its own random source port and connects to the server’s IP on port 443.”

“This separation is extremely important because it means the server never directly communicates with your system.”

“Now think from the server’s perspective.”

“When the request finally reaches the server, the source IP address it sees is not your IP address. It only sees the proxy’s IP address. As far as the server is concerned, the proxy is the client.”

“This is one of the biggest reasons why forward proxies are used.”

“Since all traffic flows through the proxy first, the proxy becomes a powerful control point. It can inspect requests before they ever reach the internet, enforce security policies, and prevent malicious traffic from going out. Because the proxy terminates the original connection and creates a new one, it has full visibility and control over the communication.”

“This also brings a very practical advantage when it comes to IP whitelisting.”

“Imagine you have an application server that only allows requests from specific IP addresses. Without a proxy, you would need to whitelist every individual client IP, which becomes very difficult to manage, especially at scale.”

“But with a forward proxy in place, all requests reaching the server come from a single IP — the proxy’s IP. So instead of maintaining a long list of client IPs, you just whitelist the proxy. This simplifies access control significantly.”

“Now let’s talk briefly about how we actually configure a proxy on a client machine, because this is where ports become critical.”

“When you go into your system or browser network settings, you don’t just enter the proxy IP address — you also specify the port number. This port is the one on which the proxy service is listening for incoming client requests.”

For mock interview scheduling and network interview guidance, you can contact us through below links:
Telegram:
https://t.me/firewallgeeks
Instagram:
https://www.instagram.com/inside_thei...

#proxy #forwardproxy #networking #computernetworks #ccna #networksecurity #cybersecurity