Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

3 Answers 3

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

I have followed step by step in this tutorial, everything is describe, how to install and use iptables with geoip to block countries. http://terminal28.com/how-to-block-countries-using-iptables-debian/

share|improve this answer
Please don't just post links here: include the relevant information so that it isn't necessary for people to have to click through... –  jasonwryan Oct 4 '13 at 23:26

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.