Find the answer to your Linux question:
Results 1 to 4 of 4
hi, I'm trying to develop a content filter.The problem is after dropping the packets i need to send "host unreachable" icmp message.But i don't know how to send that request.Can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    1

    Rejecting packets


    hi,
    I'm trying to develop a content filter.The problem is after dropping the packets i need to send "host unreachable" icmp message.But i don't know how to send that request.Can anybody tell how to send a icmp message of "host unreachable".

    Thanx in advance.............

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    With Hping its really easy.
    Then you can even make it in a BASH script.

    I hope that helps.

    Cheers,
    Robin
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    8
    Quote Originally Posted by bharat.bvrit View Post
    hi,
    I'm trying to develop a content filter.The problem is after dropping the packets i need to send "host unreachable" icmp message.But i don't know how to send that request.Can anybody tell how to send a icmp message of "host unreachable".

    Thanx in advance.............
    If you are planing on using iptables for this purpose I suggest using the "-j REJECT" flag, which will automatically send the appropriate ICMP message.

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    Here is what you are looking for:
    Code:
    -j REJECT --icmp-host-unreachable

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •