Linux – Reject with ICMP Code 3 Type 13

iptableslinuxnetworking

I'm trying to reject packets with iptables with ICMP type 3 code 13, communication administratively prohibited.

Does anyone know a method of doing this? There doesn't seem to be an argument to –reject-with that generates these packets.

Thanks

Best Answer

--reject-with icmp-admin-prohibited

Using icmp-admin-prohibited with kernels that do not support it will result in a plain DROP instead of REJECT