What is a Port? The ports we usually refer to are not ports in the physical sense, but specifically ports in the TCP/IP protocol, which are ports in the logical sense. The local operating system will allocate a port to any process that requires it. When the destination host receives the data packet, it will send the data to the corresponding port according to the destination port number in the message header, and then the process occupying the port will operate it.
Port opening method Notice! Port control is usually configured in the server operating system firewall. When you use cloud servers provided by major operators, such as Tencent Cloud and Alibaba Cloud, the system's built-in firewall may be disabled. In this case, please use the server console provided by the operator to open the port. This article records two contents: 1. Open the port under win7 2. Server (2003 or other older versions of the system, take 2003 as an example) To test the port, you can use the telnet command Listening Port: C:\Documents and Settings\administrator>netstat -na Test whether the port is open: C:\Documents and Settings\administrator>telnet 127.0.0.1 8500 Connecting to 127.0.0.1...Cannot open a connection to the host on port 8500: Connection failed Let's start opening the port: 1. Open the port under win7 How to set exceptions for Windows 7 firewall Control Panel (select View as Large Icons in the upper right corner) --- Firewall --- Advanced Settings --- Advanced Settings --- Outbound Rules --- New Rule "New Outbound Rule Wizard" on the far right. In the first step of the wizard, select the type of firewall rule to be created and select the second "Port". How to add ports in Windows 7 firewall Win7's firewall has been significantly upgraded and is now divided into inbound and outbound. The following example uses the remote access port 8080 for Tomcat to be enabled. Control Panel\All Control Panel Items\Windows Firewall Inbound rule settings The first step is to select Inbound Rules and then Create a New Rule, select the port, and then click Next. Step 2: Select TCP Select Specific Port and enter the port. If there are multiple ports, separate them with commas, for example: 88,8080 Step 3: Select Allow the connection Step 4: Select the scope of application rules Step 5: Enter the rule name Outbound rule settings The first step is to select Inbound Rules and then Create a New Rule, select the port, and then click Next. Step 2: Select TCP Select Specific Port and enter the port. If there are multiple ports, separate them with commas, for example: 88,8080 Step 3: Select Allow the connection Step 4: Select the scope of application rules Step 5: Enter the rule name At this point, the firewall rules are set up and can be enabled! In addition, for IIS7 of win7, you only need to enable the inbound rule: BranchCache content retrieval (HTTP-In) Outbound rules: BranchCache Content Retrieval (HTTP-Out) is sufficient. Step diagram: The output rules are also set in the same way You can see 2. Open the window2003 server port After logging into the server remotely, enter the control panel and double-click the firewall: Click the "Exceptions" tab to see the open ports added on the server, click Add Port. In the pop-up box, enter the port number you need to add, such as 8080, and click OK. In this way, you can see the added port number 8080 in the exceptions, click OK to complete. Go to the control panel and click "Network Connections" Right-click on the local connection, click Properties, and double-click "Internet Protocol (TCP/IP)" Click on the Advanced option In the pop-up box, click "Options", then click "Properties" In the TCP/IP filter pop-up box, add the port of TCP protocol. For example, add 8080 and click OK. You can see that port 8080 has been added. After confirming, restart the server to make it effective. Warm reminder: If a third-party firewall (with firewall level) is installed on the server, the operation level and steps are the same as the Windows Firewall operation steps! C:\Documents and Settings\administrator>netstat -na Test whether the port is open: C:\Documents and Settings\administrator>telnet 127.0.0.1 8080 Connecting to 127.0.0.1...Cannot open a connection to the host on port 8080: Connection failed Summarize The above is the open Windows server port introduced by the editor (taking opening port 8080 as an example). I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL SHOW PROCESSLIST assists in the entire process of troubleshooting
>>: Use Vue3+Vant component to implement App search history function (sample code)
Preface We already know that MySQL uses the SQL S...
This article summarizes the common commands for L...
Copy code The code is as follows: <div class=&...
There are three ways to represent colors in HTML, ...
1. System installation package yum -y install mak...
Table of contents TypeScript environment construc...
Preface Hello everyone, this is the CSS wizard - ...
Many times, we ignore the setting of the web page ...
Method 1: Use table attributes: header-cell-class...
Sometimes MySQL needs to use a function similar t...
need: The official website's resource server ...
In a table, you can define the color of the upper...
Recently, the business side reported that some us...
Table of contents vue router 1. Understand the co...
The MySQL server is running with the --skip-grant...