Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using iptables I am trying to reject packets (I want to return an ICMP message).

iptables -A FORWARD [...] -j REJECT --reject-with icmp-port-unreach

The packets are dropped but using tcpdump I can see no ICMP. What gives ? Am I doing something wrong ? Do I have to flip some sysctl or anything ?

Kernel is: 2.6.32-5-openvz-686

Please don't suggest "use DROP instead of REJECT".

share|improve this question
Are outgoing icmp packets allowed in your iptables rules? – Silent-Bob Sep 9 '11 at 23:35

Are you sure the packets in question have matched your rule to reject? Do you see the counter associated with that rule being incremented when you look at the verbose output (iptables --list --verbose)?

Have you tried disabling all the other iptables rules aside from that one to make sure that no other rules are interfering?

share|improve this answer

Are you sure you are hitting the FORWARD chain? You can add a rule to log all the matching packets.

 iptables -I FORWARD [...] -j LOG --log-prefix "FORWARDED"

If you after adding that rule you cannot see anything on /var/log/messages you probable are using the wrong chain (INPUT instead of FORWARD?) or the wrong conditions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.