4

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:

Command

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

Error

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?

1

2 Answers 2

1

The version of xtables in Debian Squeeze was pretty old, and it pre-dated the splitting of IPv4 and IPv6 into separate maps. This split happened 2010-12-18. See here.

Your support scripts are creating new-style *.iv4 and *.iv6 files, while the iptables extension module expects old-style *.iv0 files.

If you're still using Squeeze, you'll need to find and download an old version of the support scripts used to create the IP maps. A suitable version might actually be included in the xtables source code package version that matches the binary package you may be currently using.

-3

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

2
  • You might want to provide an exact working command line. Commented Mar 5, 2012 at 16:29
  • 3
    I don't think quotes make differences , 'DE' is same as DE here under bourne shell Commented Jun 3, 2012 at 7:14

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.