U
U
uuuu2020-07-26 21:39:52
linux
uuuu, 2020-07-26 21:39:52

Is it possible to disable ping the server?

Is it possible to prevent users from any ip from pinging a server on ubuntu?
Sometimes I feel like it's done on purpose...

Answer the question

In order to leave comments, you need to log in

7 answer(s)
R
Ronald McDonald, 2020-07-26
@uuuu

Can. Close the firewall protocol ICMP.

C
CityCat4, 2020-07-27
@CityCat4

Can. What for?
Disabling ICMP will create more problems for you than it solves. If you want to disable it by all means, you need to disable not all icmp, but only 0 and 8 (echo reply and echo request)

R
RomioDiver, 2020-07-27
@RomioDiver

No need to close the entire icmp. Close only ICMP type 8, Echo request. That's just ping. All other icmp requests will work.

K
Karpion, 2020-07-26
@Karpion

Well, yes, on purpose. And why does it bother you?
As a rule, the prohibition of ping, etc. ICMP in its entirety creates many problems and does nothing to solve existing problems.

I
idc2814, 2020-07-27
@idc2814

For what purpose are you going to close the ping? What threat does he pose in your opinion?
In most cases, the ping is open or closed - neither cold nor hot.

R
root31337, 2020-07-27
@root31337

You can, close icmp with a farvol, but arping will be available for example.

R
ruslan2570, 2020-07-28
@ruslan2570

echo 1 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question