Test whether the port of the UDP service is available

Source: Internet
Author: User
Tags firewall

to test whether the port of the TCP service is available, you can use:Telnet IP Port But if this is used on the UPD service, it will be an error, because Telnet is the TCP protocol, such as 192.168.80.131 on the 8888 port on a UDP service, then use Telnet 192.168.80.131 8888, the following error will be reported: Trying 192.168.80.131 ...
Telnet:connect to address 192.168.80.131:connection refused
At this point, you can use the NC tool, most distributions come with this tool, and the installation package that Fedora 9/usr/bin/nc belongs to is nc-1.84-16.fc9.i386.
Server monitoring: Nc-l-U 192.168.80.129 8001
Client: Using the command nc-u 192.168.80.129 8001, where the string is entered, the server will echo the same string, indicating whether the UDP service on port 8001 is enabled. SuSE is using Netcat, the method is basically the same: Netcat-l-u-p 8001 So you can listen on the 0.0.0.0 UDP 8001 port from another machine, or open another virtual terminal of this machine, enter: Netcat-u 192.16 8.1.123 8001 When you enter a string here, the same string is echoed, indicating that the link is ok.
probe UDP port does not pass, use the following parameters:Nc-vuz 112.91.151.10 4500 If the pass, shown as follows: [112.91.151.10] (ISAKMP) Open
If the port is not through, it is displayed as follows: 112.91.151.10:inverse Host lookup failed:
(UNKNOWN) [112.91.151.10] 4500 (IPSEC-NAT-T): Connection refused
However, it should be noted that if the firewall is turned on, the firewall will drop the packet, then the ICMP port is not unreachable message, then use the NC command to find that the actual port is not through. Think carefully about the principle of UDP is clear, UDP does not have the same ACK as TCP, so after a period of time did not receive the port unreachable, UDP think the port is through, but in fact, the UDP data is a firewall drop.


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.