Enable and disable centos ports

Source: Internet
Author: User
I have mentioned that the newly purchased server of the company uses centos 5.5. After deploying tomcat, I found that I entered 114. 80. *. *: 8080 (IP: 8080), but the default Tomcat Homepage cannot be displayed. Because we used to deploy Windows Server VPs and only use localhost for Linux development, it is a little too big. Okay, G. I have a firewall problem on the Internet. /Etc/init. d/iptables stop After it is disabled, check 114. 80. *. *: 8080 (IP: 8080) again. However, it seems that security risks are greatly increased ...... Use /Etc/init. d/iptables status View the firewall information and view the opened port. It is feasible to open the port to be used. The command is as follows: /Sbin/iptables-I input-P TCP -- dport 8080-J accept #8080 specify a port /Etc/rc. d/init. d/iptables save # Save the changes /Etc/init. d/iptables restart # Restart the firewall to make the changes take effect. Of course, if you don't feel the trouble, you can restart the system (command: reboot ). /Etc/sysconfig/iptables Add a row: -A RH-Firewall-1-INPUT-M State-State new-m tcp-p tcp-dport 8080-J accept
Permanently disable the Firewall Chkconfig-level 35 iptables off # This method is originated from the network and has not been tested. Therefore, you are not allowed to use this method for security reasons.

 

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.