LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-14-2014, 06:14 AM   #1
thirstonlinux
Member
 
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, 07:16 AM   #2
Sken
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 07:18 AM.
 
  


Reply

Tags
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 09:58 AM
how to deny user from accessing FTP service using /etc/hosts.deny in redhat 6 raasukutty Linux - Security 6 01-19-2012 05:32 PM
IPtables - How to allow only web access to everyone and deny all other services? rajeshkerala Linux - Newbie 4 07-07-2009 12:44 AM
Deny a host access to all services objorkum Linux - Networking 5 08-17-2007 03:54 PM
never_direct deny all vs. always_direct deny all simplyrahul Linux - General 1 02-16-2005 03:42 PM


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

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