转换GeoLite2数据以用于xtables geoip [英] Converting GeoLite2 data for use with xtables geoip

查看:295
本文介绍了转换GeoLite2数据以用于xtables geoip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果在这里或其他地方涉及到我,我深表歉意.我读了回溯到2016年的帖子.

My apologies if this has been covered here or elsewhere. I read the postings back to 2016.

我的debian系统停止更新xtables geoip数据库.经调查发现,这是因为Maxmind放弃了对旧版GeoIP数据库的支持.我已经完成了为GeoLite2数据库安装和配置Maxmind的geoipupdate程序,并每周在crontab中安排它的时间.

My debian system stopped updating the xtables geoip database. On investigation it developed that this is because Maxmind dropped support for legacy GeoIP databases. I have got as far as installing and configuring Maxmind's geoipupdate program for the GeoLite2 database and scheduling it weekly in crontab.

在这一点上,我很沮丧. geoipupdate返回一个.mmdb数据库.由debian提供的脚本无法使用此功能,该脚本将.CSV文件转换为/usr/share/xt_geoip/LE和/usr/share/xt_geoip/BE中的国家/地区代码文件.

At this point I am stumped. geoipupdate returns a .mmdb database. This is not usable by the debian-supplied scripts which convert .CSV files to the country code files in /usr/share/xt_geoip/LE and /usr/share/xt_geoip/BE.

debian软件包xtables-addons尚未更新以应对这种情况.

The debian package xtables-addons has not been updated to deal with this situation.

我们将非常感谢您提供帮助或解决方案的指针.目前,我仍在使用最后一个有效的数据库,该数据库已经超过六个月了.

Assistance or a pointer to a solution will be gratefully received. At present I am still using the last valid database which is now getting to be over six months old.

推荐答案

看看GeoLite2xtables:- https://github.com/mschmitt/GeoLite2xtables

Have a look at GeoLite2xtables :- https://github.com/mschmitt/GeoLite2xtables

您可以下载一个zip(或git clone). 它具有用于旧版GeoLite CSV(可能已在2019年1月上旬停止运行)和GeoLite2 CSV(您可以改用的)的示例工作流程(shell命令).

You can download a zip (or git clone). It has example workflow (shell commands) for legacy GeoLite CSV (which is probably what you have which stopped working in early Jan 2019) and GeoLite2 CSV (which you can use instead).

这篇关于转换GeoLite2数据以用于xtables geoip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆