Simulate a service port in a Windows/Linux environment.
Scenario requirements:
For large systems that involve vertical cascade (for example, interconnection with Headquarters and departments) or horizontal Interconnection (interconnection with other systems at the same level, it is often necessary to verify the port activation status when the system service is not deployed, in order to apply for port activation on the firewall.
Simulate a service port in Windows:
Use the third-party software "TCP & UDP test tool" on the server to simulate the port. You can use the "telnet ip port" command to test the port.
Simulate the service port in Linux:
You can use the "nc-v ip port" command to test whether the port is enabled. If the prompt NC command is invalid, you need to install the NC package. The default file name is "nc-1.84-22.el6.x86_64.rpm ". Run the NC command on the server to simulate the service port. For example, run the 17001 PORT Command (press Ctrl + C to terminate the 17001 Service ):
While true; do nc-lv 17001 0 <port; done
Use nc-v 10.185.3.170 17001 to return succeeded, indicating that the port is enabled; return failed: Connection refused, indicating that the port is not enabled. Of course, you can also use the telnet command to verify the service port in Linux.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.