2

Is there any way to customize the answers that can be given with the --reject-with option of the REJECT of IPTABLES?
I was reading in the man of the IPTABLES the part of the REJECT and the only possible answers are:

  --reject-with type
               Type can be
               -icmp-net-unreachable
               -icmp-host-unreachable
               -icmp-port-unreachable
               -icmp-proto-unreachable
               -icmp-net-prohibited
               -icmp-host-prohibited
               -icmp-admin-prohibited

I would like to know if it is possible to change any of them or show a customized response by me.

closed as off-topic by tylerl, schroeder Dec 10 '16 at 21:26

  • This question does not appear to be about Information security within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • These are all the established messages for delivery problems. Could you be more specific what kind of non-standard response you want to send? – Steffen Ullrich Dec 10 '16 at 17:30
  • 332/5000 Hi @SteffenUllrich , thanks for your answer. I would like to put a customized message for me ... the first one that comes to my mind would be something like: "YOU CAN NOT PING ME!!!" I have been searching the net for quite some time, but I have not been able to find any answers. Is there any way to do this ?! Salu2 PS: Sorry for my English. – kcyborg Dec 10 '16 at 18:03
  • I'm not sure I understand. Do you want a custom ICMP message which gets dropped by the peer anyway because its not a standard ICMP message or do you want some application level response (which needs an established connection first for TCP) or what exactly do you want to block (i.e. which protocol) and how exactly to respond? – Steffen Ullrich Dec 10 '16 at 18:19
  • @SteffenUllrich Thanks for the answer, again. I just want that when someone tries to ping my PC, the answer you get is "Message customized by me" (ie YOU CAN NOT PING !!!) instead of Destination Host Unreachable or any of the standard offered by the REJECT option IPTABLES. I don't want some application!!! Do you understand now? – kcyborg Dec 10 '16 at 18:32
  • I know it's not a standard thing that I want to do...but I like know if is even posible...thxs – kcyborg Dec 10 '16 at 18:35

Browse other questions tagged or ask your own question.