Open the Windows server port (take port 8080 as an example)

Open the Windows server port (take port 8080 as an example)

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.

  • The port range is from 0 to 65535 (2^16-1)
  • Once a port is occupied, it cannot be used by other processes.

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!
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 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!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Solution to the error "Windows cannot find the -n file" when installing xampp on win7 (after successful installation, port 443 is occupied and the apache server cannot start normally)
  • Windows Server System Service Port Comparison Table
  • How to modify the firewall on a Linux server to allow remote access to the port
  • How to modify the default port number of the Tomcat server
  • Win2008 R2 WEB Server Security Settings Guide: Modify 3389 port and update patch
  • How to modify the PASV port range of the FTP server under IIS
  • Modify the server 3389 remote login port
  • Diagram of the process of modifying the default port of remote desktop in Windows server

<<:  MySQL SHOW PROCESSLIST assists in the entire process of troubleshooting

>>:  Use Vue3+Vant component to implement App search history function (sample code)

Recommend

Vue monitoring properties and calculated properties

Table of contents 1. watch monitoring properties ...

express project file directory description and detailed function description

app.js: startup file, or entry file package.json:...

How to solve the 10060 unknow error when Navicat remotely connects to MySQL

Preface: Today I want to remotely connect to MySQ...

Mini Program natively implements left-slide drawer menu

Table of contents WXS Response Event Plan A Page ...

A brief discussion on the use of React.FC and React.Component

Table of contents 1. React.FC<> 2. class xx...

Detailed tutorial on installing Docker on CentOS 8.4

Table of contents Preface: System Requirements: I...

Analysis of the principle of Mybatis mapper dynamic proxy

Preface Before we start explaining the principle ...

How to use JavaScript to determine several common browsers through userAgent

Preface Usually when making h5 pages, you need to...

Mysql some complex sql statements (query and delete duplicate rows)

1. Find duplicate rows SELECT * FROM blog_user_re...

Mysql database recovery actual record by time point

Introduction: MySQL database recovery by time poi...

How to batch generate MySQL non-duplicate mobile phone number table example code

Preface In many MySQL test scenarios, some test d...

W3C Tutorial (12): W3C Soap Activity

Web Services are concerned with application-to-ap...

JS realizes video barrage effect

Use ES6 modular development and observer mode to ...