LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 11-29-2006, 02:24 AM   #1
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Rep: Reputation: 30
how to drop incomming icmp request


Using Redhat AS , i want to drop a incomming ping(ICMP) request on a interface.plz tell me how do i chaive it
 
Old 11-29-2006, 12:01 PM   #2
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Code:
iptables -A INPUT -i ethX -p icmp --icmp-type 8 -j DROP
 
Old 11-29-2006, 10:55 PM   #3
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by amitsharma_26
Code:
iptables -A INPUT -i ethX -p icmp --icmp-type 8 -j DROP

It didn't work still i am able to ping my sysytem from a other systems & also tell me how to log firewall message (drop etc)
 
Old 11-30-2006, 07:07 AM   #4
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Are you running any preexisting rules at your box ?? (if yes then please post your script)

Second if you want to log the above mentioned icmp packets coming at your box, then you got to place the log rule prior to the DROP or ACCEPT rule as LOG rules allow packets still to traverse to the next rule (which is different from the regular rules which doesnt let packets go further down in iptable rules table)

In the above rule instead of -j DROP you got to replace it with
Code:
-j LOG --log-prefix "ICMP PACKETS"
 
Old 12-01-2006, 03:35 AM   #5
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
Is it possible that i can ping any system n nobody can ping my system..! if yes then how ?
 
Old 12-01-2006, 06:26 AM   #6
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by sunlinux
Is it possible that i can ping any system n nobody can ping my system..! if yes then how ?
Code:
iptables -A INPUT -p icmp --icmp-type 8 -s ! YOUR-OWN-IP -j DROP
 
  


Reply



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
Drop connections to port 80 at firewall machine also drop at protected network? Niceman2005 Linux - Security 2 10-27-2005 08:21 AM
2 incomming internet connection siulung Linux - Networking 9 02-27-2005 01:37 PM
iptables - drop all -> allow needed OR allow all -> drop specific lucastic Linux - Security 5 12-21-2004 02:07 AM
iptables DROP icmp applied, still being pinged linuxistan Linux - Networking 3 10-18-2004 10:26 PM
ICMP traffic archives/writing ICMP traffic in a file maia_1 Programming 0 07-20-2004 03:43 AM

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

All times are GMT -5. The time now is 07:23 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