CentOS Open port and Telnet test port

Source: Internet
Author: User
Tags iptables

1 with 8080 ports for testing, first vi/etc/sysconfig/iptables open 080 ports



Firewall 8080 Port:-A input-m State--state new-m tcp-p TCP--dport 8080-j ACCEPT


2 Reboot Firewall command: Service iptables restart

View firewall Status: Iptables-l-N



3 Telnet test 22 and 8080 ports, the results are as follows



Command

telnet localhost 22

telnet localhost 8080

As shown in the figure above, a very strange problem has arisen, the firewall opened 22 and 8080 ports, but Telnet, only 22 ports can, 8080 but not

Find the reason on the Internet

A Baidu know the address (http://zhidao.baidu.com/link?url=ZCZH8xQVGFkQlhuxG6SbjoZFHL2bv4TdV31GvCv4sXQKKCEjxHNUkbTcZ__ PIUOEJN6FPXQWZZVII1L5MF_8OA)



And another article Baidu know, url (http://zhidao.baidu.com/link?url=EeaJaqBvpJTjlcZpHCe_y2ljjr2QAjTIN_NKUI0KxVu4_w_nHPfH1SO_ ADPN3WHEO52I5WC71ZHMF_WAGPAJNQ)


Both articles mention that if you want to telnet to a port successfully, you need a corresponding service to listen to the port


3 using Tomcat to monitor 8080 ports

3.1 Installing JDK and Tomcat (procedure omitted)

3.2 Start Tomcat

Again telnet 8080 port, this time finally became


Related Article

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.