- [Instructor] Netfilter is a built-in Linux firewall.
Every Linux distribution comes with netfilter
because it's part of the Linux kernel.
Iptable is a program built to configure
the netfilter firewall.
Iptables is a command line interface or CLI program
which means that you have to rely
on a Linux terminal program like this to use iptables.
Here is what a basic iptables command looks like.
Sudo
iptables,
dash L
tap Enter.
This command displays current iptable settings.
If you want to view the manual of the iptables program,
type man iptables.
Press Enter.
Netfilter organizes its ACL or access control list,
using tables.
ACL is a collection of accept and deny rules for a firewall
which is netfilter in our case.
Netfilter tables in turn contain chains
that represent actual ACL rules.
The default netfilter table is filter table
which contains input, forward and output chains.
Netfilter is a powerful tool,
however, the tricky thing is configuration and maintenance.
In this diagram, you can see a netfilter process flow.
It visualizes all the inspection points
a packet goes through when processed by netfilter.
The process starts with pre-routing.
Then depending on the routing decision,
it's either forwarded or input into a local process.
And then goes to the output inspection point.
Finally, all the packets arrive
at the post-routing inspection point.
There are netfilter built-in tables
other than the filter table,
which has input, forward and output chains.
For example, network address translation or nat
is another netfilter table.
Nat contains output, pre-routing and post-routing chains.
The mangle table is used to manipulate packets.
Netfilter and iptables provide a foundation
for Linux firewalls.
If you can configure netfilter through iptables
you should be able to set up any other firewall products
out there.