
On Wed, 29 Aug 2018 21:54:15 -0400 Jamon Camisso via talk <talk@gtalug.org> wrote:
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.
Yes, I have a Fedora laptop, and that is how I disable ping.
$ 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
It works! Thank you. Now all I have to do is stick it in a boot script. -- Howard Gibson hgibson@eol.ca jhowardgibson@gmail.com http://home.eol.ca/~hgibson