<div dir="ltr">Hi Aki,<div><br></div><div>Here is my geo.yml zone file:</div><div><br></div><div><div><font face="monospace, monospace">domains:</font></div><div><font face="monospace, monospace">- domain: <a href="http://geo.example.org">geo.example.org</a></font></div><div><font face="monospace, monospace"> ttl: 60</font></div><div><font face="monospace, monospace"> records:</font></div><div><font face="monospace, monospace"> <a href="http://geo.example.org">geo.example.org</a>:</font></div><div><font face="monospace, monospace"> - soa: <a href="http://ns.example.org">ns.example.org</a>. <a href="http://geoman.example.org">geoman.example.org</a>. 1 7200 3600 86400 60</font></div><div><font face="monospace, monospace"> - ns: <a href="http://ns.example.org">ns.example.org</a>.</font></div><div><font face="monospace, monospace"> <a href="http://deu.geo.example.org">deu.geo.example.org</a>:</font></div><div><font face="monospace, monospace"> - a: 192.0.0.2</font></div><div><font face="monospace, monospace"> - txt: Guten Tag</font></div><div><font face="monospace, monospace"> <a href="http://esp.geo.example.org">esp.geo.example.org</a>:</font></div><div><font face="monospace, monospace"> - a: 192.0.0.10</font></div><div><font face="monospace, monospace"> - txt: Muy buenos dias</font></div><div><font face="monospace, monospace"> - loc: 40 8 43.041 N 3 21 42.539 W 714m 10m 100m 10m</font></div><div><font face="monospace, monospace"> <a href="http://blah.geo.example.org">blah.geo.example.org</a>:</font></div><div><font face="monospace, monospace"> - a: 1.1.1.1</font></div><div><font face="monospace, monospace"> "*.<a href="http://geo.example.org">geo.example.org</a>":</font></div><div><font face="monospace, monospace"> - a: 127.0.0.53</font></div><div><font face="monospace, monospace"> - txt: I don't know exactly where you are</font></div><div><font face="monospace, monospace"> services:</font></div><div><font face="monospace, monospace"> <a href="http://www.geo.example.org">www.geo.example.org</a>: '%<a href="http://co.geo.example.org">co.geo.example.org</a>'</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">Here is the output of some dig commands too (note, the DNS server is on the internet, so feel free to dig yourself):</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><div><font face="monospace, monospace"><b style="background-color:rgb(0,255,0)">cpjones@ubuntu:~$</b> dig <a href="http://blah.geo.example.org">blah.geo.example.org</a> @<a href="http://14.201.167.71">14.201.167.71</a></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">; <<>> DiG 9.10.3-P4-Ubuntu <<>> <a href="http://blah.geo.example.org">blah.geo.example.org</a> @<a href="http://14.201.167.71">14.201.167.71</a></font></div><div><font face="monospace, monospace">;; global options: +cmd</font></div><div><font face="monospace, monospace">;; Got answer:</font></div><div><font face="monospace, monospace">;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31532</font></div><div><font face="monospace, monospace">;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1</font></div><div><font face="monospace, monospace">;; WARNING: recursion requested but not available</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">;; OPT PSEUDOSECTION:</font></div><div><font face="monospace, monospace">; EDNS: version: 0, flags:; udp: 1680</font></div><div><font face="monospace, monospace">;; QUESTION SECTION:</font></div><div><font face="monospace, monospace">;<a href="http://blah.geo.example.org">blah.geo.example.org</a>. IN A</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">;; ANSWER SECTION:</font></div><div><font face="monospace, monospace"><a href="http://blah.geo.example.org">blah.geo.example.org</a>. 60 IN A 1.1.1.1</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">;; Query time: 3 msec</font></div><div><font face="monospace, monospace">;; SERVER: 14.201.167.71#53(14.201.167.71)</font></div><div><font face="monospace, monospace">;; WHEN: Sun May 27 08:38:54 STD 2018</font></div><div><font face="monospace, monospace">;; MSG SIZE rcvd: 65</font></div></div><div><font face="monospace, monospace"><br></font></div><div><div style="font-family:monospace,monospace"><b style="background-color:rgb(0,255,0)">cpjones@<b style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(0,255,0)">ubuntu</b>:~$</b> dig <a href="http://geo.example.org">geo.example.org</a> @<a href="http://14.201.167.71">14.201.167.71</a></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">; <<>> DiG 9.10.3-P4-Ubuntu <<>> <a href="http://geo.example.org">geo.example.org</a> @<a href="http://14.201.167.71">14.201.167.71</a></div><div style="font-family:monospace,monospace">;; global options: +cmd</div><div style="font-family:monospace,monospace">;; Got answer:</div><div style="font-family:monospace,monospace">;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25678</div><div style="font-family:monospace,monospace">;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1</div><div style="font-family:monospace,monospace">;; WARNING: recursion requested but not available</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">;; OPT PSEUDOSECTION:</div><div style="font-family:monospace,monospace">; EDNS: version: 0, flags:; udp: 1680</div><div style="font-family:monospace,monospace">;; QUESTION SECTION:</div><div style="font-family:monospace,monospace">;<a href="http://geo.example.org">geo.example.org</a>. IN A</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">;; AUTHORITY SECTION:</div><div style="font-family:monospace,monospace"><a href="http://geo.example.org">geo.example.org</a>. 60 IN SOA <a href="http://ns.example.org">ns.example.org</a>. <a href="http://geoman.example.org">geoman.example.org</a>. 1 7200 3600 86400 60</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">;; Query time: 4 msec</div><div style="font-family:monospace,monospace">;; SERVER: 14.201.167.71#53(14.201.167.71)</div><div style="font-family:monospace,monospace">;; WHEN: Sun May 27 08:37:37 STD 2018</div><div style="font-family:monospace,monospace">;; MSG SIZE rcvd: 90</div><div style="font-family:monospace,monospace"><br></div><div style=""><font face="arial, helvetica, sans-serif">And finally, the record under services:</font></div><div style="font-family:monospace,monospace"><br></div><div style=""><div style="font-family:monospace,monospace"><b style="background-color:rgb(0,255,0)">cpjones@ubuntu:~$</b> dig <a href="http://www.geo.example.org">www.geo.example.org</a> @<a href="http://14.201.167.71">14.201.167.71</a></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">; <<>> DiG 9.10.3-P4-Ubuntu <<>> <a href="http://www.geo.example.org">www.geo.example.org</a> @<a href="http://14.201.167.71">14.201.167.71</a></div><div style="font-family:monospace,monospace">;; global options: +cmd</div><div style="font-family:monospace,monospace">;; connection timed out; no servers could be reached</div><div style="font-family:monospace,monospace"><br></div><div style=""><font face="arial, helvetica, sans-serif">Regards,</font></div><div style=""><font face="arial, helvetica, sans-serif">Chris.</font></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, May 27, 2018 at 3:06 AM Aki Tuomi <<a href="mailto:cmouse@cmouse.fi">cmouse@cmouse.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, May 26, 2018 at 08:14:15PM +1000, Chris Jones wrote:<br>
> Hi there,<br>
> <br>
> I have successfully setup a pdns instance using the geoip backend and a<br>
> copy of the legacy GeoIP database (from<br>
> <a href="https://dev.maxmind.com/geoip/legacy/install/country/" rel="noreferrer" target="_blank">https://dev.maxmind.com/geoip/legacy/install/country/</a>). Throughout the<br>
> MaxMind website, I read that this database is end of life in favor for<br>
> GeoIP2 (available at <a href="https://dev.maxmind.com/geoip/geoip2/geolite2/" rel="noreferrer" target="_blank">https://dev.maxmind.com/geoip/geoip2/geolite2/</a>).<br>
> <br>
> The GeoIP legacy database is in the .DAT format, and the GeoIP2 database is<br>
> in a MMDB format. Reading the pdns documentation, it is confusing whether<br>
> MMDB is nativity supported or if I have to do something to the database<br>
> file to make it work.<br>
><br>
<br>
It should work.<br>
<br>
> My pdns.conf file contains the following parameters when using the GeoIP<br>
> legacy database:<br>
> <br>
> launch=geoip<br>
> geoip-database-files=/etc/pdns/GeoIP.dat<br>
> geoip-zones-file=/etc/pdns/geo.yml<br>
> <br>
> That works fine. But when I change the *geoip-database-files* parameter to<br>
> use the MMDB file, it does not work (geo requests are timing out - standard<br>
> records work fine though).<br>
> <br>
> launch=geoip<br>
> geoip-database-files=/etc/pdns/GeoLite2-City.mmdb<br>
> geoip-zones-file=/etc/pdns/geo.yml<br>
> <br>
> Has anyone got an example or suggestions on how I can use the GeoIP2<br>
> databases with the pdns-geoip backend?<br>
> <br>
> System: CentOS 7 + pdns 4.1.3<br>
> <br>
> Thanks,<br>
> Chris.<br>
<br>
Can you provide your geo.yml?<br>
<br>
Aki<br>
</blockquote></div>