jpillora / ipfilter

A package for IP Filtering in Go (golang)
MIT License
387 stars 47 forks source link

geolite.maxmind.com - no such host #11

Closed brouillette closed 4 years ago

brouillette commented 4 years ago

I'm getting this error upon startup;

After running ipfilter.New(...)

""" Get http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz: dial tcp: lookup geolite.maxmind.com on 127.0.0.11:53: no such host """

The site is down - what should be done instead? Wait for it to come back up, or use a different library?

Thanks..

crazy-max commented 4 years ago

A MaxMind's license key is required in order to download GeoLite2 databases now.

@jpillora I have created a service to download GeoIP databases called geoip-updater and I think we could use the MaxMind client here. What do you think?

pierreN commented 4 years ago

Hmm the web archive server doesn't answer now. Too bad. Your ipfilter package was quite nice and easy to use, but this breaks it. It would be nice to have an option to disable GeoIP filtering completely in the meanwhile (so that we don't need the DB). Something exactly like

        f, err := ipfilter.New(ipfilter.Options{
                AllowedIPs:     my_list_of_whitelisted_ips,
                BlockByDefault: true,
                IPDBNoFetch:   true,
        })

but which doesn't panic like panic: IP DB not found and fetch is disabled while the DB is not being used in this conf.

crazy-max commented 4 years ago

@pierreN You can use this link in the meantime.

pierreN commented 4 years ago

This archive link doesn't answer here ? Anyway I ended up subscribing to maxmind and using their mmdb file, thanks!

brouillette commented 4 years ago

The archive link worked for me, but I don't know how long it will hold up before the archive is overwritten. Until then, this will do! Thanks