Open the specified port in Linux, and specify the port in linux
After tomcat is installed in Linux, the input address http: // ip address on the client cannot be accessed, and port 80 cannot be accessed.
The Linux Firewall disables port 80 by default. Therefore, to access port 80, either disable the firewall or open port 80.
The steps for enabling port 80 are as follows:
1. Modify the/etc/sysconfig/iptables file and add the following line:
-A input-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT
Restart iptables
Service iptables restart
2. Firewall settings
1) takes effect after restart
Enable Firewall: chkconfig iptables on
Disable firewall: chkconfig iptables off
2) takes effect immediately and becomes invalid after restart
Enable strong fire prevention: service iptables start
Disable firewall: service iptables stop
Service iptables status view Firewall status