You are here:Home > Best VPN > How to check if a network port is open

How to check if a network port is open

Summary:This article introduces how to detect whether the local network supports certain ports, which is helpful in ruling out the reasons for VPN connection…
horizonVPN Official website sandVPN Official website VPNhood Official website hailianVPN Official website
GoduckVPN Official website Fast Wind VPN Official website Fast Orange VPN Official website(Recommend) NetShekanVPN Official website

This book is available as an e-book in EPUB format

PayPal sponsors this website for any amount. I will send you an EPUB e-book via email. Please send me an email

Email: shuxueha@outlook.com

PayPal: https://paypal.me/zhipinglei

You can also scan the PayPal QR code below to sponsor

You can also purchase this book on Amazon: click to enter the Amazon official website

This article introduces how to detect whether the local network supports certain ports, which is helpful in ruling out the reasons for VPN connection failure. For example, some companies, internet cafes, and other public networks may restrict VPN protocol related ports, making it impossible to connect and use. If it is relatively easy to handle computer restrictions alone, you can use the batch processing method we introduced earlier to lift restrictions. In addition, you can also refer to the connection error code to find the cause of the problem.

The following text uses the telnet command to detect ports, which only supports TCP port detection. If batch scanning detection is required, it is obviously not practical to manually tap CMD. Professional software such as Nmap and X-scan can be used.

Windows XP system can directly run the telnet command, while Visat and above systems do not support the telnet command by default. You need to add component support. The method is as follows: open "Control Panel" - "Programs and Features" - click "Open or Close Windows Features" on the left - check "Telnet Client" in the component addition window, as shown in the figure below. After installation, you can use it. In addition, the use of Linux system commands is also similar, so we will not introduce them here.

How to use TELNET command:

Simultaneously press the Win+R key combination (the Win key is the Microsoft logo key on the keyboard), enter CMD in the pop-up run window, and click OK. Then enter a command similar to the following in the command line window for detection.

telnet 198.52.202.127 1723

Explain the meaning of the command above:

Telnet: Issue a telnet command to detect

198.52.202.127: Detect the target IP address of the network server (i.e. fill in the VPN line IP, do not telnet the local gateway IP, as this will not be detected and the local port used is random)

1723: Port detection (PPTP protocol TCP port is 1723, L2TP protocol UDP port is 1701, OPENVPN protocol UDP/TCP default port is 1194). Note that the telnet command does not support UDP port detection. Additionally, OPENVPN supports custom port usage, so different VPN service providers may use different ports

Here is an example of the detection method in the following text and image:

After entering the command and pressing enter to execute, if there is no error, it will default to blank, indicating that the port is open.

If an error message is displayed indicating a failed connection, it means that the detection port is closed.

Complete list of TELNET commands (excerpted from hadenchen):

telnet [-d] [-a] [-n tracefile] [-e escapechar] [[-l user] host [port]]

The meanings of each item are as follows:

-Set the initial value of the debug switch to TRUE

-Attempt to automatically log in. For now, this option is used to send usernames through the USER variable of the ENVIRON option (if the remote host supports this usage). If the name returned by the getlogin (2) function matches the current user ID, then the USER variable is the name returned by the command. Otherwise, it is the username corresponding to the current user ID.

-Open the tracefile file to record trace information.

-When connecting to a remote system, if the remote host supports the ENVIRON option, the current username will be sent as the value of the variable USER to the remote host. This option automatically includes the - a option.

-E escapechar sets the initial value of TELNET escape characters to escapechar. If this option is ignored, there will be no escape characters.

Host represents the official name, alias, or IP address of the remote host.

Port number, which refers to the address of various Internet applications. If the port number is not specified, use the default port number of telnet.

If the telnet command does not take any parameters, the system will enter the telnet command state with the prompt telnet>. Various telnet commands can be used at the prompt. For example, by typing the help command at the prompt, you can get the telnet command table. The telnet command and its functional description are shown below.

Command Function Description:

Close the current connection

Logout forces the remote user to log out and close the connection

Display the parameters of the current operation

Mode attempts to enter command line mode or character mode

Open connection to a certain site

Quit exit

Telnetsend sends special characters

Set the parameters for the current operation

Unset resets the current operating parameters

Status Printing Status Information

Toggle to switch operating parameters

SLC changes the state of special characters

Auth on/off confirmation function is suspended

Telnetenviron changes environment variables? display help information

These commands can be abbreviated as long as they do not conflict with each other. The telnet command is usually followed directly by the node name, indicating that it will be registered to the specified remote machine. For example, the command: telnet ox6. ios. ac.cn. After logging in to the remote host, you can start using the resources and services available on that machine, and even log in to other hosts again.

Note: You may have noticed that the term 'remote' in 'remote login' is only a logical concept. That is to say, the host you logged in to through remote login may be far away or close at hand.

If the telnet port number used by the remote node is not a standard TCP port (telnet's standard port is 23), then the corresponding port number needs to be attached after the host name. The command is as follows: telnet eve. assumption. edu 5000

Comment: Port refers to the location of a specific application on a remote machine. If no port is specified when logging into the remote host, it will consider you as a fixed user and require you to enter a valid username and password before entering the system. When connected through a specific port, the host does not require a username, but restricts users from using a special feature.

Exit: Once logged into a remote host, you become a user of that computer. We know that there is significant heterogeneity in the hardware environment, operating systems, and applications of various hosts on the Internet. Therefore, their exit methods are also different. However, in general, you can try using commands such as q, quit, exit, logout, Ctrl+D, or done in sequence. Perhaps one of these commands can help you end the operation and return to the UNIX prompt state. If the attempt is unsuccessful, try Ctrl+] to return to the telnet>prompt, then type close or quit and press Enter. For example, if you have remotely logged into the ox6.ios.ac.cn host from the bjlad.ppublic.bta.cn host and now want to return to the local machine, you can enter the exit command or use Ctrl+] to return to the telnet>prompt. Assuming you use Ctrl+] to end the telnet connection. Then enter the quit command in order to return to the UNIX prompt on the bjlad. public. beta. cn host. At this point, the screen displays as follows:

telnet>quit

Connection closed.


High-speed VPN Fast VPN Preferred Accelerator VPN Reliable VPN
High quality VPN Old fashioned VPN Stable VPN(Recommend) Smooth VPN
Share with Friends: