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