HTTP tunnel principle and firewall penetration method-2

Source: Internet
Author: User

HTTP tunnel principle and firewall penetration method-2

This article provides a way to establish a TCP connection through the proxy server to bypass the firewall.
Generally, the firewall limits connections on many ports, but HTTP connections are still allowed (otherwise, no one can access the network ).

The Protocol specifies a CONNECT request method. The client can use this method to notify the proxy server to connect to the specified server IP address and port number. Proxy Server
After receiving this request, connect to the specified server IP address and port number. If the connection fails, the client is notified and the connection is closed. If the connection succeeds, the client is sent
"Coonection established" and keep the connection. After establishing a connection with the client and the Real Server, the proxy server does not care about the data content, and the result is tunnel.

[Client] ---- [firewall] ------> [proxy server: 80] -------> [Real Server]
|
SRC only allows data on port 80 to be forwarded to the Dest through data forwarding.

Related Protocols:

At the client end, we are only interested in the connect method. After a connection is established between the client and proxyserver, the client must send a CONNECT request.
The format is as follows:

Connect <destination_address >:< destination_port> <Header_line> <CR> <LF>
<Header_line> <CR> <LF>
...
<Header_line> <CR> <LF>
<CR> <LF>

The proxy server processes requests from the client and establishes a connection with destionation_address: destination_port.

The proxy server returns an HTTP Response to the client.
The format is as follows:
<Http_version> <code> <message> <CR> <LF>
<Header_line> <CR> <LF>
<Header_line> <CR> <LF>
...
<Header_line> <CR> <LF>
<CR> <LF>

If the proxy server analyzes the client request format incorrectly or fails to connect to destionation_address: destination_port, the connection is closed.
If successful, data can be forwarded as tunnel.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.