LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Which way is better to deny Services (https://www.linuxquestions.org/questions/linux-newbie-8/which-way-is-better-to-deny-services-4175511031/)

thirstonlinux 07-14-2014 05:14 AM

Which way is better to deny Services
 
Hi All,

I have been told to disable the incoming ping requests. and I know about three ways of doing this. I would like to know which one is the better approach.

Note My SELINUX and Firewall is enabled..

Method 1:
edit the /etc/hosts.deny file with entry "sshd: *"

Method 2:
iptables -t filter -I INPUT -p icmp --echo-type echo-request -j REJECT

Method 3:
edit the /etc/sysctl.conf file with "net.ipv4.icmp_echo_ignore_all = 1"

Sken 07-14-2014 06:16 AM

Don't quote me on this, but if all you're trying to do is disable incoming ping requests, I'm pretty sure that editing the sysctl.conf file will be fine.


All times are GMT -5. The time now is 01:12 PM.