Re: change reply message of icmp request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2007-06-18, Krishantha Dinesh <krishantha@xxxxxxxxxxxxxx> wrote:
> Eg;- if my firewall got ping request I need  send massage as "Ping request
> not ALLOWED by this IP" or something like this.
> I am going to reject icmp like this
>
> Iptables -A INPUT -p icmp -j REJECT
>
The match filter is wrong, because it blocks all ICMP messages. Even
responses from remote hosts.

Try this:

iptatbles -A INPUT -p icmp --icmp-type echo-request \
    -j REJECT --reject-with=icmp-host-prohibited

-- Petr




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux