So we need to disable ping requests.
How are we going to do that?
Well, start by using sysctl minus a pipegrab ICMP,
Internet Core Message Protocol.
That's a protocol that is used behind ping requests.
And there we can see two parameters.
Here's parameter number one.
And notice that this is ICMP underscore echo ignore all.
And here we have parameter number two for IPv6,
which is ICMP dot echo ignore all.
So it's a small difference, and it's
easy to make a mistake there.
But let's go to PROC NET.
Sorry, PROC SYSNET, that is.
Not to be confused, because there is a PROC NET.
And let me use echo one greater than IPv4 slash ICMP echo
ignore all.
And likewise, echo one greater than IPv6 slash ICMP slash
echo ignore all.
And then when I use my ping to localhost,
then localhost is ignoring echo requests.
And if that is what you like, you
can make it persistent by using any of these files
that are related to sysctl.conf.
The recommended way is to create a drop-in file in etc sysctl.d.
And if you think, well, I'm not sure if I like that,
then either you reboot or you revert the settings
that you have just changed.
My advice, I would like to see ping disabled on localhost,
because you never know if anywhere
in the next couple of lessons this is functionality
that you are going to need.
But if you like it, this is how you do it.