In the company, the fourth time to modify the "firewall rules", tidy up a bit.
Note: The change on the command line is temporary and requires some action to keep the rule forever, making it always effective.
========================
1, the first step, first look at the server "firewall rules":
Iptables-l
IPTABLES-L-n//Plus one-n displays IP and ports in digital form and looks more comfortable
iptables-l-N--line-number //delete, need to use this, this bar can see each firewall rule number
2. Add a rule:
I am here for the future ES 9200 port, can be accessed by people, so need to add firewall rules:
Iptables-i INPUT 1-p TCP--dport 9200-j ACCEPT//Add (-i) a rule on the first line: TCP port number 9200 allow (ACCEPT) access
3. Delete a firewall rule
iptables-l-N--line-number //delete, need to use this, this bar can see each firewall rule number
iptables-d INPUT 1//delete (-D) First line of firewall rules
4, the most important step, after modifying the firewall rules, you need to save:
Service Iptables Save
Modify Linux firewall rules