Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-14-2014, 05:14 AM   #1
Registered: Jul 2011
Posts: 62

Rep: Reputation: Disabled
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"
Old 07-14-2014, 06:16 AM   #2
LQ Newbie
Registered: Sep 2013
Location: Pennsylvania
Distribution: Slackware, CentOS
Posts: 13

Rep: Reputation: Disabled
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.

Last edited by Sken; 07-14-2014 at 06:18 AM.


deny, iptables, ping, sysctl

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
squid proxy server configuration in rhel5 and deny deny accessing websites renjindd Linux - Newbie 1 09-09-2012 08:58 AM
how to deny user from accessing FTP service using /etc/hosts.deny in redhat 6 raasukutty Linux - Security 6 01-19-2012 04:32 PM
IPtables - How to allow only web access to everyone and deny all other services? rajeshkerala Linux - Newbie 4 07-06-2009 11:44 PM
Deny a host access to all services objorkum Linux - Networking 5 08-17-2007 02:54 PM
never_direct deny all vs. always_direct deny all simplyrahul Linux - General 1 02-16-2005 02:42 PM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration