LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 05: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, 06: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 06:18 AM.
 
  


Reply

Tags
deny, iptables, ping, sysctl



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:41 AM.

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
Open Source Consulting | Domain Registration