To disable ping in the server, you can execute the following
Now, if you want to re-enable it,
Now to disable it permanently, you can edit /etc/sysctl.conf
edit the following line
net.ipv4.icmp_echo_ignore_all = 0
and replace the "0" with "1" ie.
net.ipv4.icmp_echo_ignore_all = 1
then save and close the file.
root@amaziah [~]# echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
Now, if you want to re-enable it,
root@amaziah [~]# echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all
Now to disable it permanently, you can edit /etc/sysctl.conf
root@amaziah [~]#vi /etc/sysctl.conf
edit the following line
net.ipv4.icmp_echo_ignore_all = 0
and replace the "0" with "1" ie.
net.ipv4.icmp_echo_ignore_all = 1
then save and close the file.
No comments:
Post a Comment