Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux Notes 13 Iptables with Firewalld Firewall.

Shulou Source: shulou.com Published: 2022-06-02 21:09:13 11月12日 Update

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

Tags: Data processing rules network cards commands configuration methods traffic routing selection different location pre-processing actions multiple application layer files logs entries policies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Microsoft Shulou Technology MariaDB MySQL