In this lecture, we'll see if they accept and drop targets again, it's more like a recap because we've
already used them in so many examples.
Both accept and drop are terminating targets.
If a packet is matched against a ruler that has the accept or drop target, the packet is accepted or
dropped and will not traverse the chain any more.
Let me show you an example.
I want to permit incoming pink pancakes only from a management station or from a single IP address before
getting started.
I want to explain to you what pink means in case you don't know, being is a utility comment available
in any operating system.
And it serves two primary purposes to check if the destination host is available and to measure the
round trip time for messages sent from the originating host to a destination host that are echoed back
to the source.
According to Wikipedia, the name Ping comes from active sonar technology that sends a pulse of sound
and listens for the echo to detect objects underwater ping or breaks by sending Internet control message
protocol or ICMP echo request packets to the target host and waiting for ICMP reply packets.
So allowing ping means, in fact allowing incoming ICMP echo request packets and outgoing ICMP echo
reply packets.
Lix seeks Help IAPT plus minus B ICMP, the protocol is ICMP minus minus help.
We notice that we specify the type of ICMP packet using minus minus ICMP minus type, and these are
all available ICMP types.
Among them, we a reply and echo request.
In this example, I'll write type table rules only for the input chain, so for incoming traffic, particular
right IP table rules for the output chains as well.
So the first rule will allow incoming ICMP packets of Type A. request if the source IP address is that
of the management host.
In this example, I'll consider the management host as being the Windows recording machine, which has
the IP address.
190 to 168 to zero that 112.
IP table is minus A input, minus B, ICMP minus minus ICMP, minus type echo, minus request.
Minus is.
192 dot, 168 dot zero, that 112 minus G except.
And the second rule that will drop all incoming ICMP request Bishkek's if the source address is another
host, not the management station.
So IP table is minus 18, both minus ICMP minus minus ICMP minus type Akko request minus J drop.
In fact, it's the same rule without the minus option.
So without the source IP address, let's test it.
If al-Bakhit with the source IP address 192 dot 168, dot zero, dot 112 is coming, it will be accepted
by the first one being a terminating target.
The packet will not be evaluated by the second goal, which of course would drop it if it evaluated
the packet.
From the management station, I'm going to ping Linux on.
And pink is working perfect, and I think the viral.
And we see mixed paychecks by the first toll.
Now, if an equal request packet is coming from another IP address, the first rule will not make.
And the second one will drop the packet.
Let's bring it from Lennox to.
And we notice that Linux, too, is not receiving anything back.
The second rule is dropping any Akko request packets coming from another source IP address.
There are 37 dropped packets by the second.