[GTALUG] Ubuntu -- Disabling Ping
Jamon Camisso
jamon.camisso at utoronto.ca
Wed Aug 29 21:54:15 EDT 2018
On 29/08/18 21:44, Howard Gibson via talk wrote:
> I am playing with my hack Ubuntu machine, and I am sorting out
> security. I want to disable ping. This is a laptop, and I want to
> document the application of aluminium foil.
>
> The standard ping disabler is the following line...
>
> # echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
>
> This works fine on my Fedora laptop. On Ubuntu, I get...
The # makes me think you are root on the Fedora laptop.
> $ sudo echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
> -bash: /proc/sys/net/ipv4/icmp_echo_ignore_all: Permission denied
That's expected with a sudo echo > redirect invocation. The shell is
doing redirection. sudo is invoking echo, the output of which is being
redirected in your normal user's shell to a file that you do not have
permission to write to.
Try this if you want to go the sudo route:
echo 1 |sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_all
That way tee is invoked with elevated privileges and writes its output
to the file.
Or you can become root like on your Fedora system and use echo 1 >...
Cheers, Jamon
More information about the talk
mailing list