LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 10-04-2004, 03:04 PM   #1
Chuck23
Member
 
Registered: Jun 2004
Distribution: Fedora Core1
Posts: 63

Rep: Reputation: 15
not responding to ping


Hello. I'm a relative n00b to linux security, so pardon me if this question seems dumb.

How can I prevent my computer from responding to pings? I assume I need to edit some iptables conf file or another in some way. I'm currently running Fedora Core 1 with the most recent kernel.

More specifically, due to my broadband internet connection, I think I need to be able to respond to pings from my ISP, but I want to ignore all others. How can it be done? Please hold my hand on this one.

Thanks.
 
Old 10-04-2004, 03:34 PM   #2
serz
Member
 
Registered: Apr 2003
Location: Buenos Aires, Argentina
Distribution: Slackware, Gentoo
Posts: 397

Rep: Reputation: 30
You can do that with this command:

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

That would block all ping responses. As for only response pings from your ISP, I think you will need iptables.
 
Old 10-04-2004, 03:36 PM   #3
dcostakos
Member
 
Registered: Aug 2004
Posts: 44

Rep: Reputation: 15
Disabling all ping requests is easy (you should also add this to your startup scripts):
Code:
 echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
If you have sysctl, you could edit /etc/sysctl.conf and add this line:

Code:
net.ipv4.icmp_echo_ignore_all = 1
And run sysctl -p. This would automagically disable ping responses from your system at boot time.

To enable ping to only your ISP but deny it to everyone else, you'd have to use iptables and know what IP address(es) request ping. This example would allo ping from any address in the 10.0.0.0/255.255.255.0 subnet but deny it from everyone else.

Code:
iptables -A INPUT -p icmp -s 10.0.0.0/24 -j ACCEPT
iptables -A INPUT -p icmp -j REJECT
 
Old 10-04-2004, 03:37 PM   #4
dcostakos
Member
 
Registered: Aug 2004
Posts: 44

Rep: Reputation: 15
serz beat me to it -- Do'h
 
Old 10-04-2004, 06:49 PM   #5
Chuck23
Member
 
Registered: Jun 2004
Distribution: Fedora Core1
Posts: 63

Original Poster
Rep: Reputation: 15
Will editing sysctl.conf alone do it?

[edit: Apparently so...]

Thanks again!

Last edited by Chuck23; 10-04-2004 at 07:23 PM.
 
  


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 13 03-17-2011 02:47 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 AM
dhcp client can't ping gateway but can ping other local hosts dirty_forks Linux - Networking 7 10-08-2004 10:54 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 04:57 AM
Firewall still responding to ping azebuski Linux - Security 2 01-28-2004 02:05 PM


All times are GMT -5. The time now is 01:37 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration