LinuxQuestions.org
Visit Jeremy's Blog.
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 06-21-2011, 01:03 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Rep: Reputation: 31
Stopping ping .


I am using fedora on two computers. I want to disable ping command on temporary bases.For that purpose i enter into the folder

PHP Code:
#cd /proc/sys/net/ipv4 
To check its value i issue a command
PHP Code:
#cat icmp_echo_ignore_all

does 0 means to disable ping command ?I even change the value but still my 2nd computer con ping the computer.

PHP Code:
# echo "1" > icmp_echo_ignore_all
#cat icmp_echo_ignore_all

in both cases ping works. Definitely 0 means to stop ping and 1 means to enable ping.
please guide me
thanks in advance,
garden
 
Old 06-21-2011, 01:34 AM   #2
mrmnemo
Member
 
Registered: Aug 2009
Distribution: linux
Posts: 527

Rep: Reputation: 51
try this

If your just wanting to disable ping for certain users, do that. You might want to look at this. Essentially, just run :
Code:
su -c "chmod 700 /bin/ping"
Now only root can run it. You could also edit your users PATHS. Maybe you mean to stop icmp packets ? Ping is a very useful command I think. If you want to stop "ping" packets, your really wanting to stop icmp, right? If your trying to edit /etc/sysctl.conf, you will need to reload it after you do so.
Code:
su -c "sysctl -p"
Any way, 8p.
 
Old 06-21-2011, 01:48 AM   #3
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Original Poster
Rep: Reputation: 31
thanks for the reply. I want that if i try to ping my 2nd computer "suppose it is a web server" it should not give any reply from it. In this case what should i do ? at the moment it want to do it temporary.
regards
garden
 
Old 06-21-2011, 01:54 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I'd block icmp requests using iptables.
 
Old 06-21-2011, 02:04 AM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,243

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
1 is to disable and it works just fine for me
 
Old 06-21-2011, 03:49 AM   #6
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Original Poster
Rep: Reputation: 31
thanks a lot for the help.
 
Old 06-21-2011, 12:27 PM   #7
mrmnemo
Member
 
Registered: Aug 2009
Distribution: linux
Posts: 527

Rep: Reputation: 51
I noticed you marked as solved. Was it due to iptables or that you needed to reload the sysctl file?
 
  


Reply


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 03:39 PM
Debian 5 , after SysCp Installation and configure Ping Valure ( ping: unknown host ) brenner23 Linux - Networking 1 07-14-2010 10:01 PM
Simple question about command syntax ping/log ping results ohalnet Linux - Networking 1 07-25-2006 05:46 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 05:57 AM


All times are GMT -5. The time now is 11:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration