The strange problem with the firewall is solved by cainiao
Source: Internet
Author: User
The strange problem with the firewall is that cainiao solves the problem-general Linux technology-Linux technology and application information. The following is a detailed description. [I = s] This post was last edited by biyexp at, January 15 ,.
By default, firewall configuration
[Root @ gaoxin ~] # Iptables-L
Chain INPUT (policy ACCEPT)
Target prot opt source destination
ACCEPT all -- anywhere state RELATED, ESTABLISHED
ACCEPT icmp -- anywhere
ACCEPT all -- anywhere
ACCEPT tcp -- anywhere state NEW tcp dpt: ssh
ACCEPT tcp -- anywhere state NEW tcp dpt: http
REJECT all -- anywhere reject-with icmp-host-prohibited
I added 3306
[Root @ gaoxin ~] # Iptables-I INPUT-p tcp-m state -- state NEW-m tcp -- dport 3306-j ACCEPT
Use iptables-L to view the information, and you will find that the information has been added.
[Root @ gaoxin ~] # Iptables-L
Chain INPUT (policy ACCEPT)
Target prot opt source destination
ACCEPT tcp -- anywhere state NEW tcp dpt: mysql
ACCEPT all -- anywhere state RELATED, ESTABLISHED
ACCEPT icmp -- anywhere
ACCEPT all -- anywhere
ACCEPT tcp -- anywhere state NEW tcp dpt: ssh
ACCEPT tcp -- anywhere state NEW tcp dpt: http
REJECT all -- anywhere reject-with icmp-host-prohibited
Then I save and restart
[Root @ gaoxin ~] # Service iptables save
Iptables: Save the firewall rules to/etc/sysconfig/iptables: [OK]
[Root @ gaoxin ~] # Service iptables restart
Iptables: clear firewall rules: [OK]
Iptables: Set the chain to policy ACCEPT: filter [OK]
Iptables: uninstalling module: [OK]
Iptables: Application Firewall Rules: [OK]
----------------------------------
So far, this is normal ..
However, if I use setup to disable the firewall, and then use setup to enable the firewall
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // cupic.img168.net/bbsfile/forum/201208/15/1132250pew%g11f6edtl6.jpg'); ">
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">
Why does the configuration disappear? Cainiao listen modestly to ask for answers
[Root @ gaoxin ~] # Iptables-L resumes the default configuration.
Chain INPUT (policy ACCEPT)
Target prot opt source destination
ACCEPT all -- anywhere state RELATED, ESTABLISHED
ACCEPT icmp -- anywhere
ACCEPT all -- anywhere
ACCEPT tcp -- anywhere state NEW tcp dpt: ssh
ACCEPT tcp -- anywhere state NEW tcp dpt: http
REJECT all -- anywhere reject-with icmp-host-prohibited
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