LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   iptables icmp error replay messages (https://www.linuxquestions.org/questions/linux-networking-3/iptables-icmp-error-replay-messages-628203/)

adam_blackice 03-15-2008 05:14 AM

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 .

datopdog 03-15-2008 06:16 AM

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 (*)


adam_blackice 03-15-2008 07:05 AM

thanks for your replay and i have appreciated it :)


All times are GMT -5. The time now is 06:31 PM.