Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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've just installed xtables-*, compiled the geoip database, but when I try to use an iptables command it always gives back the following error:


iptables -I INPUT -p tcp --dport 80 -m geoip --src-cc 'DE' -j DROP


Could not open /usr/share/xt_geoip/LE/DE.iv0: No such file or directory
iptables v1.4.8: Could not read geoip database`

The problem is, that the support scripts create the geoip database, but they all end as iv4 and iv6, not iv0. When I rename the DE.iv4 file to DE.iv0, the error becomes:

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

How can I breathe life into the system?

share|improve this question
I have followed step by step in this tutorial, everything is describe, how to install and use iptables with geoip to block countries. terminal28.com/how-to-block-countries-using-iptables-debian – user48564 Oct 4 '13 at 21:45

Debian administration explain in the last part how create the countries files. I didn't test.

OOpps, sorry I didn't see that this question is very old.

share|improve this answer

Do no use 'DE' .. just write DE,CA,UK, like this, without quotes

share|improve this answer
You might want to provide an exact working command line. – Karlson Mar 5 '12 at 16:29
I don't think quotes make differences , 'DE' is same as DE here under bourne shell – warl0ck Jun 3 '12 at 7:14

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.