Home  >  Article  >  Operation and Maintenance  >  Telnet cannot connect tomcat port in linux

Telnet cannot connect tomcat port in linux

王林
王林Original
2020-02-14 16:29:293197browse

Telnet cannot connect tomcat port in linux

Problem:

Telnet under Windows and Tomcat under Linux cannot work.

Reason:

Firewall setting problem under Linux /etc/sysconfig/iptables

Related video sharing: linux video tutorial

Solution:

1. Turn off the firewall under Linux

service iptables stop

2. Add firewall access permissions for the tomcat port

vim /etc/sysconfig/iptables

Copy a development command for port 22

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

Add it at the end and change 22 to your tomcat port number.

3. Restart the service

service iptables restart

4. Restart tomcat

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Telnet cannot connect tomcat port in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn