Simulate a service port in a Windows/Linux environment.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.