Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I'm using ubuntu server 10.04 and I have to enable tarpit module . I installed the followning packet :

aptitude install xtables-addons-common xtables-addons-source
module-assistant auto-install xtables-addons-source

but when i try to add a tarpit rule I get this error:

iptables: No chain/target/match by that name.

Thanks for your help .

share|improve this question
up vote 2 down vote accepted

Clean all rules:

iptables -F
iptables -X

Use these default parameters:

iptables -P INPUT    DROP
iptables -P OUTPUT   DROP

Then do the following:

 iptables-save > /etc/network/iptables
 iptables-restore < /etc/network/iptables

Then enter:

iptables -A INPUT -p tcp -m tcp -dport 80 -j TARPIT

Or you can set a trap for ALL ports, except for your own:

   iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
   iptables -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
   iptables -A INPUT -p tcp -m tcp -j TARPIT
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.