Configuring host-based firewalls
We are all familiar with firewalls as devices to regulate incoming and outgoing network traffic to prevent the entry of malicious code or attacks and to prevent the exfiltration of data.
Host-based firewalls are firewall rules that can be activated at the OS level so that you can apply incoming and outgoing network traffic protection for your system.
One feature of host-based firewalls is that they are configured per system, offering a higher level of flexibility when needed.
There are several host-based firewalls for Unix systems, such as iptables, firewalld, netfilter, ipfw, and more.
Understanding iptables
iptables is used to set up, maintain, and review the tables of the IPv4 and IPv6 packet filter rules in the Linux kernel.
To understand iptables, we need to first understand its components.
Chains
Chains are the set of rules defined for a particular task.
iptables uses three sets of rules (chains) to manage traffic:...