LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-19-2004, 03:06 AM   #1
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Rep: Reputation: 30
How to Block ping into my m/c ??


How can I block ping in my m/c, is there any way to do that.

And is there any way to know who is pinging, who has pinged to m/c ???
 
Old 10-19-2004, 03:42 AM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
2 iptables rules similar to this should do what you need:
Code:
iptables -I INPUT -m limit -p icmp --icmp-type echo-request -j LOG --log-prefix="ping..."

iptables -I INPUT -p icmp --icmp-type echo-request -j DROP
 
Old 10-19-2004, 04:08 AM   #3
mardanian
Member
 
Registered: Mar 2004
Distribution: Fedora
Posts: 254

Rep: Reputation: 30
yes im fully agree with Demonbane blocking all pings are not a good idea however...if you wants to DROP all sorta pingy then

iptables -A INPUT -p icmp -j DROP

or here is a kernel hack
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

regards
 
Old 10-19-2004, 05:47 AM   #4
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Original Poster
Rep: Reputation: 30
thanx Demonbane && mardanian


@mardanian
Quote:
blocking all pings are not a good idea however.
Why is it so ?


-jack
 
  


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
block ping and ssh varun_saa Mandriva 1 02-08-2005 06:08 AM
block ping Ammad Linux - Security 1 01-13-2005 01:52 PM
How to block ping on win98 m/c ? emailssent General 1 10-19-2004 06:27 AM
Configure Smoothwall to block ping? chrisknight Linux - Software 10 09-15-2003 04:21 PM
Block ping scans (iptables) robeb Linux - Security 9 06-12-2002 03:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:41 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
Open Source Consulting | Domain Registration