Hello and welcome back.
In this lesson, we'll talk about depletable options, flicks or switches, these options specify the
desired action to perform, and only one of them can be specified on the command line unless otherwise
stated.
Also note that all of these options are written in uppercase letters.
Let's see what options are available minus a means upend the rule to the end of the selected chain.
Let's look at an example.
I Lapindo, rule to the output chain that drops incoming traffic to Port 25, so it's empty B traffic.
IAPT Bullis, it's not necessary to specify the table, it's by default, the filter table, so I don't
try to minus the filter.
I could write if I want minus a the name of the chain input minus BTP, DCP Traffik minus minus deport
twenty 25.
The packets are going to port 25 minus G drop.
Before hitting the enter key, I want to test that port 25 is open.
From another Linux machine, I'll scan that port and I'm going to use and map and map minus B, the
Port 25 and the IP address of the Linux machine that I am scanning.
By the way, you could simply install and map by writing Apte, get, install and map.
And we notice that Part 25 is open.
And I'm adding VIP tables while I'm scanning the port again.
And the parties feel that this IP table rule has dropped the packets to Port 25.
Let's add another rule that blocks incoming traffic to Port 80 IP tables, minus A input, minus B DCB
minus minus the port at minus J drop.
And I'm also installing a Web server to test it, right?
It's very easy to install a Web server on Ubuntu.
I'm installing the Apache Web server.
From the other Linux operating system, I'm going to scan Port 80.
The port is filtered and I leased the firewall, I'll see a lot of mixed and dropped packets.
Each one has dropped two packages.
Another important option is minus ie minus, I insert one or more holes in the selected chain on a specific
position or on top or position one if no position is given.
Let's look at an example.
I want to drop incoming traffic to Port UDP 69, which is the FTB Trivial File Transfer Protocol.
Instead of minus a ileus, minus I, the Chinese import minus B, the protocol is UDP and the destination
port is sixty nine.
Minus Jay drop.
Now I am listing the fireguard.
We see that the last rule has been added on top of the input chain.
Now that rule is the first rule in the chain and this is very important because the rules are traversed
in order.
If I want to a on a specific position, for example, on the second position, I can simply specify
the position after the name of the chain.
Like this.
I'll insert this role on position three on the third position,
and the role is on the third position.
Let's suppose I've changed my mind and I want to accept all traffic to Port Athie.
Remember that I've already added a rule that drops traffic to Port 80.
I'm running the same IP table as comment, just a vep instead, minus a ileus, minus I.
OK, this is Darren.
I'm using minus I.
And instead of dope, I'm using accept.
Instead of bending the rules to the end of the chain, the rule will be added on top of the chain on
first position.
We see the rule on the first position on input chain.
Paused the video for 30 seconds and think about what will happen, will the traffic to Port Authority
be dropped or accepted?
Let's test it using the browser from another machine.
I'm writing the IP address of Linux on.
And we see that the port is open, we could connect to Port 80 and the page loaded successfully.
When I've added the rule using minus I, the rule became the first rule in the chain and the rules are
traversed in order top to bottom when a packet is arriving to Port 80, the first will make the packet
and accepts it.
Accept is a terminating target and that means that the packet is accepted and the no other rule will
check the packet.
So in fact, here, the rule that drops in coming back to Port 80 will never be evaluated.
That's why the packages were accepted.
And this is an example of why the order of the rules is so important.