Hello,
Tarun a écrit :
>
> I want to know if there is any option in socket so that Kernel should
> not respond to my ICMP requests.
>
> Basicall, I am writing my own ICMP packet sender and reciever
> application using raw sockets and while testing i am getting two
> responses for my ICMP Echo Request, one from my application and other
> from kernel.
>
> How can I block so that Kernel should not handle ICMP packets but my
> application should handle it.
You can tell the kernel to ignore all ICMP echo requests :
sysctl -w net/ipv4/icmp_echo_ignore_all=1
This will affect only echo requests, not other ICMP request types.
|