Software firewall iptables under linux – view and clear rules, define default policies – linux operation and maintenance
A firewall is a way for users to restrict access to certain ip or users to their hosts. There are two types of firewalls, hardware firewalls and software firewalls. Software firewalls are mainly used to filter data packets, and hardware firewalls are mainly used to protect against malicious attacks and filter data packets, such as DDOS attacks. Here, let’s explain the software firewall under linux-iptables. iptables and firewalld Under centOS6, the default software firewall is iptables, and in centos7, it is firewalld. What is the connection between them? In fact, firewalld is a newly packaged software on the original iptables. When learning iptables, it is recommended to close firewalld first, and open iptables yum install iptables-services systemctl stop firewalld systemctl start iptables table and chain of iptables Different of iptables Tables represent different functions, there are 4 tables by default filter (filter) nat (address translation) mangle raw Under different tables, they have their own rule chains: filter (INPUT/OUTPUT/FORWARD) nat (prerouting/output/postouting) The meaning of these chains As follows: INPUT chain – incoming data packets apply the rules in this rule chain OUTPUT chain – apply the rules in this rule chain to outgoing packets FORWARD chain – apply the rules in…