Problem in vdns

15 views
Skip to first unread message

Nuno Fernandes

unread,
Jan 2, 2009, 12:45:20 PM1/2/09
to geoipdns-users
Hi,

I just installed vdns-1.08 but i can't seem to make geoip work.

My data file has the following:

[root@os1 root]# cat data
%PT:81.84.0.0:81.84.255.255

.geo.example.com:174.133.65.202:a:300
+www.geo.example.com:192.168.1.2:500::PT
+www.geo.example.com:192.168.1.1:500::nomatch

But when i query it replies with the "nomatch" one:

Here is the tcpdump:

[root@os1 root]# tcpdump -i any -n port 53
tcpdump: WARNING: Promiscuous mode not supported on the "any" device
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 96
bytes

11:44:58.728399 IP 81.84.255.161.37177 > 174.133.65.202.domain:
21401+ A? www.geo.example.com. (37)
11:44:58.728540 IP 174.133.65.202.domain > 81.84.255.161.37177:
21401*- 1/1/1 A 192.168.1.1 (88)

In conf-cc i've build vdns with debug. Here is the output:

INIT_inotify():

inotify_fd=1

data initialized!

no pending events

lookup LOQ for A record www.geo.example.com
found mid=0 uid=0

LOC not found for (mid=0,uid=0)

found loq loc=1219579562,mid=0,uid=0 for
q=www.geo.example.com,defaultloc=1219579562
SOA type requested
5154ffa1:b365:59dd + 0001 www.geo.example.com



Any ideas?
Thanks,
Nuno Fernandes

c...@mud.ro

unread,
Jan 2, 2009, 2:03:19 PM1/2/09
to geoipdns-users
nuno,
in 1.0r8 loc data is written as %name:ipclass:bitmask...
so you may want to write that as:
%PT:81.84.0.0:16

i didnt update any docs with r8, my apologies

'teja!


On Jan 2, 7:45 pm, Nuno Fernandes <nuno.fernan...@gmail.com> wrote:
> Hi,
>
> I just installed vdns-1.08 but i can't seem to make geoip work.
>
> My data file has the following:
>
> [root@os1 root]# cat data
> %PT:81.84.0.0:81.84.255.255
>
> .geo.example.com:174.133.65.202:a:300
> +www.geo.example.com:192.168.1.2:500::PT
> +www.geo.example.com:192.168.1.1:500::nomatch
>
> But when i query it replies with the "nomatch" one:
>
> Here is the tcpdump:
>
> [root@os1 root]# tcpdump -i any -n port 53
> tcpdump: WARNING: Promiscuous mode not supported on the "any" device
> tcpdump: verbose output suppressed, use -v or -vv for full protocol
> decode
> listening on any, link-type LINUX_SLL (Linux cooked), capture size 96
> bytes
>
> 11:44:58.728399 IP 81.84.255.161.37177 > 174.133.65.202.domain:
> 21401+ A?www.geo.example.com. (37)

Nuno Fernandes

unread,
Jan 3, 2009, 7:23:15 AM1/3/09
to geoipdns-users
Hi,

It works now. Nevertheless i've found what may be considered a bug...

I've modified a perl script from Anders (http://www.anders.com/1offs/
buildGeoLiteCountryCSV.pl.txt) to create the proper syntax for this
1.0r8 version.
So i have a data file with all of the netblocks of Maxmind geoip. My
data file is something like:

%PT:62.229.66.12:2
....
ALL_MAXMING_RECORDS
....
# my records
.geo.example.com:174.133.65.202:a:300

+www.geo.example.com:192.168.1.1:500::PT
+www.geo.example.com:192.168.1.2:500::nomatch

If the request comes from PT, it's correcly replied with ip
192.168.1.1. but if the ip comes from, say.. US, it reports "no such
domain":

Host www.geo.example.com not found: 3(NXDOMAIN)

What seems to be the problem is that if i have a LOC record that
matches the requestor ip and i don't have a LOQ record for that
country it replies NXDOMAIN.
If i put in data file only the PT LOC records, it matches the nomach
record and replies the 192.168.1.2 record.

Thanks,
Nuno Fernandes

adrian ilarion ciobanu

unread,
Jan 3, 2009, 12:43:11 PM1/3/09
to geoipdn...@googlegroups.com
that IS NOT a bug.
if you declare US LOCs then i expect US-mapped RRs. read about the
request flow. this is not "maxmind db enabled tinydns". i didnt make it
to "work with maxmind database" that was just an example for you, the
user. filter the maxmind entries to whatever your needs are dont just
drop it in there and expect it to work.


if you only use (Portugal, rest_of_Them) maps then you dont want to
create LOC records for all the countries. read about xml maps. in fact
read the entire wiki doc.

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "geoipdns-users" group.
> To post to this group, send email to geoipdn...@googlegroups.com
> To unsubscribe from this group, send email to geoipdns-user...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/geoipdns-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

--
adrian ilarion ciobanu
http://adirau.com

adrian ilarion ciobanu

unread,
Jan 3, 2009, 12:59:20 PM1/3/09
to geoipdn...@googlegroups.com
so,
to work with maxmind,
READ about ipmaps xml file.

yours should look something like:

<ipmaps user="system" out="/var/service/vdns/root/users/system/loc.data">
<map mname="portuguesedoitbetter">
<mapit from="PT" to="PT"/>
</map>
</ipmaps>


thats for user=system,mapname=portuguesedoitbetter

run ipdb_update.pl configs=ipmaps.xml it will generate loc data to the
path defined in the xml ... check veridns/cfg.pm some paths matter in
there the rest... its just junk

then build it with your records.

http://pub.mud.ro/~cia/files/vdns-scripts-1.0r8.tgz

it will generate your LOCs with bitmasks, etc... i had some good reasons
to move it to bitmasks instead of ipclass intervals.

also remember with this ipdb_update.pl script you can keep in sync the
maxmind database ... put it in cron to run monthly

... and let me know if u run into problems. if u clean up the scripts
srcs sendem back to lists. if u write a faq for the enduser, send it
back to the list.

Nuno Fernandes

unread,
Jan 4, 2009, 9:16:58 AM1/4/09
to geoipdns-users
Hi,

Some remarks...

The url of your scripts in http://pub.mud.ro/wiki/Geoipdns is not
correct. It points to http://pub.mud.ro/~cia/files/ftp/geoipdns-management-scripts-1.0.tgz
and it should point to http://pub.mud.ro/~cia/files/vdns-scripts-1.0r8.tgz

There is a bug in your perl. You aren't exporting the
ipdb_rebuild_master function and it's required to be used in
ipdb_update.pl, or else it fails in some usages.

--- veridns/db.pm.orig 2009-01-04 07:31:26.000000000 -0600
+++ veridns/db.pm 2009-01-04 07:31:37.000000000 -0600
@@ -13,7 +13,7 @@
use Data::Dumper;

use base qw(Exporter);
-our %EXPORT_TAGS = ( 'upd_' => [ qw(ipdb_update_master
ipdb_update_slaves ipdb_update_user ipdb_get_handle ipdb_compile) ] )
;
+our %EXPORT_TAGS = ( 'upd_' => [ qw(ipdb_update_master
ipdb_update_slaves ipdb_update_user ipdb_get_handle ipdb_compile ipdb
_rebuild_master) ] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'upd_'} } );

sub ipdb_compile


I'm in the process of creating a src.rpm.

Best regads,
Nuno Fernandes
> > Hostwww.geo.example.comnot found: 3(NXDOMAIN)
> adrian ilarion ciobanuhttp://adirau.com
>
>  smime.p7s
> 7KViewDownload

adrian ilarion ciobanu

unread,
Jan 4, 2009, 10:49:22 AM1/4/09
to geoipdn...@googlegroups.com
right, i spotted it.
well i suppose i only ran it first time with chkupdate flag so next time
without chkupdate i got the ipdb handle alright.

also updated the download link for scripts.

i suppose i need to clean that crap from wiki doc and keep a short,
clearly written howto. i tried to read it now and i understand nothing.
some idiot wrote it.

Reply all
Reply to author
Forward
0 new messages