LinuxQuestions.org
Visit Jeremy's Blog.
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 03-15-2008, 05:14 AM   #1
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Rep: Reputation: 32
iptables icmp error replay messages


hello all ,

if there is a way to reject the ICMP requests with a specific "string" or a specific type of errors ?

for example if we have a rule like that

Code:
iptables -A INPUT -s 192.168.10.12 -p ICMP --icmp-type echo-request -j REJECT
i have tried many types like host-prohibited and network prohibited instead of echo-request but it didnot succeeded so if there is a way to return a specific string or any error instead of port unreachable i will be thankful .
 
Old 03-15-2008, 06:16 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
Code:
 --reject-with type
              The type given can be
               icmp-net-unreachable
               icmp-host-unreachable
               icmp-port-unreachable
               icmp-proto-unreachable
               icmp-net-prohibited
               icmp-host-prohibited or
               icmp-admin-prohibited (*)
 
Old 03-15-2008, 07:05 AM   #3
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanks for your replay and i have appreciated it
 
  


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
IPTABLES question - how do you reject icmp? Thaidog Linux - Networking 12 12-06-2007 11:16 AM
iptables DROP icmp applied, still being pinged linuxistan Linux - Networking 3 10-18-2004 10:26 PM
UDP socket and ICMP messages myself_rajat Linux - Networking 0 05-25-2004 08:49 AM
iptables icmp limits dunkyb Linux - Security 0 05-08-2003 05:10 PM
Invalid ICMP messages? Otto.W. Linux - Networking 2 04-04-2003 04:10 PM

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

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