Linux Notes 13 Iptables with Firewalld Firewall.
Four ways to configure the network card
1. Modify the network card through the configuration file
Vim / etc/sysconfig/network-script/ifcfg-eno...
2 、 nmtui
Using the setup command in RHEL5 and RHEL6 systems
Using the nmtui command in RHEL7
3 、 nm-connection-editor
4. Click with the mouse
Execute the command to restart the network card after configuring the network card in any of the above ways: systemctl restart network
Rule chain
Iptables service refers to the policy entries used to process or filter traffic as rules. Multiple rules can form a rule chain, which is classified according to the location of packet processing, as follows:
Process packets (PREROUTING) before routing
Processing incoming packets (INPUT)
Processing outbound packets (OUTPUT)
Processing forwarded packets (FORWARD)
The packet (POSTROUTING) is processed after routing.
Action:
1. Allow (ACCEPT allows traffic to enter private network)
2. REJECT Note: do an experiment in the exam and use this at the end
3. Reject (DROP packet loss) Note: when the network cable is dropped, it is also rejected.
4. Log (LOG)
Iptables, firewall-cmd and firewall-config are based on the data link layer, and TCP Wrappers is based on the application layer