Commands related to Linux firewall because a virtual machine on a Linux machine fails, you need to restart the machine, and all the virtual machines on this machine will be restarted. After the restart, you need to manually restart the services on each virtual machine. The service is started normally, but enter 80 in the browser. 112... linux firewall-related commands because a virtual machine on a Linux machine fails, you need to restart the machine, and all the virtual machines on this machine will be restarted. After the restart, you need to manually restart the services on each virtual machine. The service is started normally, but enter 80 in the browser. 112. *. *: 8080 (ip: 8080), but cannot access the default homepage of the service. The problem with the firewall is as follows: 1 ). input/etc/init. d/iptables stop, close and View 80 again. 112. *. *: 8080 (ip: 8080), which can be accessed successfully. However, it seems that security risks are greatly increased ...... 2 ). input/etc/init. d/iptables status: view the firewall information. the opened port is displayed. 3 ). if you only need to open the port you want to use, run the following command:/sbin/iptables-I INPUT-p tcp -- dport 8080-j ACCEPT #8080 for the specified port 4 ). /etc/rc. d/init. d/iptables save # save the changes. 5 ). /etc/init. d/iptables restart # restart the firewall to make the change take effect. In addition, add a line directly in/etc/sysconfig/iptables: -A RH-Firewall-1-INPUT-m state-state NEW-m tcp-p tcp-dport 8080-j ACCEPT stop firewall service iptables stop start firewall service iptables start view firewall configuration iptables-L-n
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