ComputersSoftware

How to configure the reception of connections via 8080 (port): instructions, diagram and feedback

A port in computer networks is a natural number that is recorded in the header of the OSI protocol. It is designed to identify the process of receiving the packet in one host.

As a rule, in the user space on a host with an installed OS, several processes occur simultaneously, and in each of them a certain program operates. If these programs affect the computer network, the "shell" from time to time receives through it an IP packet that is intended for one of the programs.

How it works?

If the program uses data exchange through a network, this process can occur as follows:

  • The OS requests a specific port number. In this case, the system can both provide it to the program, and prohibit transmission (this happens in cases when this port number is already used by another application).
  • The OS does not require a specific port number, in any free port. The system chooses it and provides it to the program.

How to open the port (8080, 80 and so on)? Within the network, information is exchanged according to a specific protocol (between two processes). To establish a connection, you need the following:

  • IP addresses of the recipient and sender hosts (it is necessary that a route is built between them);
  • Protocol number;
  • The numbers of both ports (the recipient and the sender).

If the connection is via TCP, then the sender's port is used as the recipient's OS to send the acknowledgment of the received data, and the receiver's process for transmitting the response.

Open and closed ports

From the sender's side, the host and port number act as an analog of the return address, which is indicated on the envelopes. This number is called the inverse number.

In cases where a process on the host uses the same port number on an ongoing basis, such a port is considered open. For example, a program associated with a server can always use 80 or 8080 for communication. When the process can not open the port, it is considered to be closed.

Port numbers

All ports have their own numbers registered in the established order. Each of them is designed for its specific purpose. So, when working on the Internet, you can often see port 8080. What is this functionality for?

According to official data, this port works on the TCP protocol and is intended for use with HTTP. Unofficially, it is also used by the Tomcat servlet container, written in Java.

TCP port 8080 can use a specific protocol for communication, depending on the application. The protocol is a set of formalized rules that explains how data is transmitted over the network. This can be presented as a language that is used between computers to help them communicate more effectively.

The HTTP protocol, which works through the 8080, defines the format of communication between Internet browsers and Web sites. Another example is the IMAP protocol, which defines the connection between IMAP mail servers and clients, or, finally, the SSL protocol, which specifies the format used for encrypted messages.

Data transfer

Thus, TCP port 8080 uses the transmission control protocol. It is one of the main protocols in TCP / IP networks. While the IP protocol deals only with packets, TCP allows two hosts to establish a connection and exchange data streams. He guarantees their delivery, as well as the fact that the packages will be delivered to port 8080 in the same order in which they were sent. A guaranteed 8080 connection is the key difference between TCP and UDP. UDP 8080 would not guarantee a connection the same way.

How to open port 8080 in Windows 7?

To do this, go to the "Start" menu and find the Control Panel. In it you need to click on the submenu "Network" and find in it "Branmauer". In the "Exceptions" tab, find the "Add Port" item. You will be presented with a dialog box in which you will be asked to enter the port number. Verify that TCP is configured in the settings, and then click OK.

How to close port 8080? To do this, it is enough to configure the connection to another specific port.

Advanced HTTP and TCP proxy configuration

The HTTP protocol works on top of the TCP protocol, but provides additional information about the assignment of the message. For this reason, the two proxies are configured differently.

HTTP traffic includes the target host and port for the message. It is sent over a TCP connection to a TCP endpoint, that is, between a specific host and a port. Typically, an HTTP message points to the same endpoint as the TCP connection. If you change the client configuration to use an HTTP proxy, the connection is made with a different host and port, instead of the one specified in the HTTP URLs. This means that the TCP endpoint in the message is different from the endpoint to which it is connected.

For example, if the HTTP request is sent to the page http://192.0.2.1:8080/operation, the request includes "192.0.2.1:8080" in the "Host" header of the HTTP message, which is sent to the 8080 port on the host 192.0. 2.1.

However, if you configure the HTTP client to use a proxy server, the basic TCP connection goes to the TCP endpoint for it, while the messages still contain the original endpoint.

For example, if you configure the client to send its messages to the proxy server at 198281.100.1 port 3128, and the client will send a request for http://192.0.2.1:8080/operation, the message still contains "192.0.2.1: 8080" In the header "Host", and now also in the "Request-Line" field. However, this message is now sent via a TCP connection to address 198.51.100.1:3128. Thus, the HTTP proxy can receive messages on one port (proxy port 8080) and can forward them to several different services based on the recipient information.

How can I configure the reception of connections through port 8080?

So, the "Host" header was added to HTTP / 1.1. The HTTP / 1.0 connection does not include it. For this reason, such connections that do not pass through the proxy do not include the host and port for the message. However, the HTTP / 1.0 information sent through the proxy server still contains the target host and port in the "query string". Therefore, the absence of the "Host" header does not cause a problem for the proxy.

To enable the TCP proxy server, you must change the client configuration from the TCP endpoint in real time to the replacement endpoint. Unlike HTTP, this protocol does not provide a built-in ability to use a proxy. That is, if you connect to a proxy server via TCP, no mechanism is provided for the transfer of information to the target addressee.

How to configure multiple connections with 8080?

The only way for a TCP proxy to allow connections to multiple systems (that is, with endpoints), regardless of what traffic will be sent over these connections, is listening to another port for each of the systems. This allows you to connect and maintain information about which of its port numbers corresponds to each endpoint. Then the client is configured with a proxy port corresponding to each system with which it needs to connect. TCP proxy ports for listening and their corresponding endpoints are configured in operators in the proxy configuration file, RTCP_install_dir / httptcp / registration.xml. First of all, you need to check port 8080 - if it is open by default, further settings will be made in a few minutes.

In this example, 198.51.100.1 is the IP address of the proxy server. Any traffic sent to port 3333 on a proxy server is sent to port 8080 at: www. Example. Com:

Therefore, you must modify the client configuration file whenever you add a new destination for traffic. This restriction does not apply to the HTTP proxy.

Interaction between HTTP and TCP

To understand how ports are handled in HTTP and TCP proxy servers, suppose you have two services: 192.0.2.1:8080 and 192.0.2.1:8081, and a proxy server running at 198.51.100.1. If they differ by IP address, and not by port number, this example will be the same, except for the corresponding address for each service. If they expect HTTP traffic per HTTP proxy, requests for both TCP endpoints can be sent to it. When HTTP sees that the message is addressed to 192.0.2.1:8080, the proxy redirects the message to this address or applies any rules that it has for this service. The same procedure applies to 192.0.2.1:8081, using the same port.

If these two services are instead waiting for TCP traffic, two TCP proxy ports that are defined by the two elements in the configuration file should be opened:

The client configuration for the first service changes from "192.0.2.1:8080" to "198.51.100.1:3333", and for the second one, from "192.0.2.1:8081" to "198.51.100.1:3334". The client sends a message (TCP packet) to the first service at the first address.

The proxy server receives it on this port (3333), but does not know what data is sent over this connection. All that he knows is the connection to port 3333. Therefore, the proxy server consults with its configuration and sees that the traffic to this port should be redirected to 192.0.2.1:8080 (or that a rule for this service must be applied to it). If you can not redirect all of your HTTP traffic, because the client configuration does not support HTTP proxy configuration, you must use a reverse HTTP proxy.

In it, instead of the destination URL, you specify the one you need. This process is similar to the TCP proxy configuration process in which you specify it as the TCP endpoint for the message in the client system and create a forwarding rule.

The difference is that you add the type attribute to the rule that defines HTTP, as in the following example: .

How is traffic flowing?

Now the proxy server is configured to receive only HTTP traffic to the assigned port, and can use more rich filtering. For example, a server can filter traffic to a stub that does not have a specific path in its URL, or that does not use a specific HTTP method, such as POST. However, since the stub does not always work, the server still needs a destination from the element to be able to send traffic to the system. For example, suppose that the client needs to connect to the service at 192.0.2.1:8080 and use the reverse HTTP proxy at 198.51.100.1:3333.

Before the client can use the proxy server, the client configuration for this service must be changed from a URL, for example, http: // 192.0.2.1:8080/ operation, to http: // 198.51.100.1:3333/ operation. The request that is sent to this new URL falls into the proxy server.

The request message contains the TCP endpoint for the proxy (198.51.100.1:3333) in the "Host" header, and not the system address, because the client does not know that it is sending the redirected message. This simplified client role determines the nature of such a connection. Thus, the proxy uses the elements to know that the request coming to port 3333 requires one of the following: it must be redirected to the live system at 192.0.2.1:8080, and the header "Host" in the message must be Updated. For the message, all rules of this service should be applied, for example, routing to a stub.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.