An easy way to test the AIX port-Linux Enterprise Application-Linux server application information. The following is a detailed description. The following uses port 80 as an example to describe how to test whether a port works:
1. Edit the/etc/services file and find the following two lines:
Http 80/tcp # World Wide Web HTTP
Http 80/udp # World Wide Web HTTP
Use # To comment out the two rows and add the new two rows as follows:
# Http 80/tcp # World Wide Web HTTP
# Http 80/udp # World Wide Web HTTP
Telnet2 80/tcp
Telnet2 80/udp
2. Edit the/etc/inetd. conf file and find the following line:
Telnet stream tcp6 nowait root/usr/sbin/telnetd-
Add a row under it
Telnet2 stream tcp6 nowait root/usr/sbin/telnetd-
3. # refresh-s inetd
4. # lssrc-ls inetd
Confirm a row in the output
Telnet2/usr/sbin/telnetd-a active
5. # netstat-
The output of this command shows that port 80 is listening, that is
Tcp 0 0 *. 80 *. * LISTEN
6. Try to log on to the server from another AIX machine with the following command. If the server can log on normally, port 80 is working properly.
# Telnet 80
7. # netstat-an | grep 80
You can see that a connection is established through port 80, similar to the following output:
Tcp4 0 0 9.181.50.90.80 9.181.50.107.3750 ESTABLISHED
8. The test is complete.
Note that after the test is completed, change the/etc/services and/etc/inetd. conf files back to the previous status and refresh the inetd service:
# Refresh-s inetd
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.