Discussion:
[Pdns-users] PDNS - NEED HELP ABOUT POWERDNS WITH GEO BACKEND FOR MULTI-DOMAIN
Đức Vinh Hồ
2012-02-29 01:55:41 UTC
Permalink
Dear ALL,
I'm researching the solotion for multiple-domain redirecting. And i found
your topic here :
http://old.nabble.com/Launching-multiple-geo-backends-td28858865.html
After successfully rebuild the geobackend.cc and geobackend.hh files, i
finished to make && make install the new-geo-backend-modules. But my
problem is still not solved
Let's me introduce something about my project :

i have 2 *geo*-maps which are loaded properly
[*geo*backend] Finished parsing 2 director map files, 0 failures
but in *geo* zone i can specify only one zone (domain)
#*geo* start*geo*-zone=*geo*.domain1.net

if i use*geo*-zone=*geo*.domain1.net, *geo*.domain2.net*geo*backend
it's not working

and if i use*geo*-zone=*geo*.domain1.net*geo*-zone=*geo*.domain2.net
only the 2nd one is loaded in *geo*backend.

I think you can help me to resolve this problem.
Thanks you so much !

Regarding,
Vinh Ho
José Arthur Benetasso Villanova
2012-02-29 02:35:20 UTC
Permalink
Hi Đức.

Try this configuration with the patch:

launch=geo:geo1,geo:geo2
geo1-zone=geo.domain1.net
geo2-zone=geo.domain2.net

Basically, you need to tell to PowerDNS that those are different
configuration, much like kernel modules alias.

The documentation about alias is here: http://doc.powerdns.com/modules.html

I hope this help.
Post by Đức Vinh Hồ
Dear ALL,
I'm researching the solotion for multiple-domain redirecting. And i found
http://old.nabble.com/Launching-multiple-geo-backends-td28858865.html
After successfully rebuild the geobackend.cc and geobackend.hh files, i
finished to make && make install the new-geo-backend-modules. But my
problem is still not solved
i have 2 *geo*-maps which are loaded properly
[*geo*backend] Finished parsing 2 director map files, 0 failures
but in *geo* zone i can specify only one zone (domain)
#*geo* start*geo*-zone=*geo*.domain1.net
if i use*geo*-zone=*geo*.domain1.net, *geo*.domain2.net*geo*backend it's not working
and if i use*geo*-zone=*geo*.domain1.net*geo*-zone=*geo*.domain2.net
only the 2nd one is loaded in *geo*backend.
I think you can help me to resolve this problem.
Thanks you so much !
Regarding,
Vinh Ho
_______________________________________________
Pdns-users mailing list
http://mailman.powerdns.com/mailman/listinfo/pdns-users
--
José Arthur Benetasso Villanova
Đức Vinh Hồ
2012-02-29 03:50:26 UTC
Permalink
Thanks Jose Arthur,
I try your suggestion but nothing happen (*Fatal error: Trying to set
unexisting parameter 'geo1-zone'*)
The one more step i want to confirm is that : the geobackend.cc and the
geobackend.hh files. I want to make sure that these 2 file that i
re-configure is correct.
So can you give me your 2 correct file (geobackend.cc & geobackend.hh) or
you can show me how to use the patch (i means how to use diff, patch
command correctly)
Post by José Arthur Benetasso Villanova
Hi Đức.
launch=geo:geo1,geo:geo2
geo1-zone=geo.domain1.net
geo2-zone=geo.domain2.net
Basically, you need to tell to PowerDNS that those are different
configuration, much like kernel modules alias.
http://doc.powerdns.com/modules.html
I hope this help.
Post by Đức Vinh Hồ
Dear ALL,
I'm researching the solotion for multiple-domain redirecting. And i found
http://old.nabble.com/Launching-multiple-geo-backends-td28858865.html
After successfully rebuild the geobackend.cc and geobackend.hh files, i
finished to make && make install the new-geo-backend-modules. But my
problem is still not solved
i have 2 *geo*-maps which are loaded properly
[*geo*backend] Finished parsing 2 director map files, 0 failures
but in *geo* zone i can specify only one zone (domain)
#*geo* start*geo*-zone=*geo*.domain1.net
if i use*geo*-zone=*geo*.domain1.net, *geo*.domain2.net*geo*backend it's not working
and if i use*geo*-zone=*geo*.domain1.net*geo*-zone=*geo*.domain2.net
only the 2nd one is loaded in *geo*backend.
I think you can help me to resolve this problem.
Thanks you so much !
Regarding,
Vinh Ho
_______________________________________________
Pdns-users mailing list
http://mailman.powerdns.com/mailman/listinfo/pdns-users
--
José Arthur Benetasso Villanova
Vasiliy Tolstov
2012-02-29 05:19:37 UTC
Permalink
Hi Đức.
launch=geo:geo1,geo:geo2
geo1-zone=geo.domain1.net
geo2-zone=geo.domain2.net
Basically, you need to tell to PowerDNS that those are different
configuration, much like kernel modules alias.
The documentation about alias is here: http://doc.powerdns.com/modules.html
I hope this help.
Sorry for braking thread, but is that possible to get geo backend
domains from database?
For example i want to create on the fly some domains what have geo
part and redirect users for specific ip based on geo.
--
Vasiliy Tolstov,
Clodo.ru
e-mail: ***@selfip.ru
jabber: ***@selfip.ru
José Arthur Benetasso Villanova
2012-02-29 10:20:38 UTC
Permalink
Hi again.

You are right, the 1st module can't be an alias.

I've tried to recompile the patch and configure it once again. So far, I
just made the configuration work, I didn't test the entire settings. Here
the *working* configuration:

launch=geo,geo:geo2
geo-zone=example.com
geo-soa-values=ns1.example.com,postmaster.example.com
geo-ns-records=ns1.example.com,ns2.example.com
geo-ttl=3600
geo-ns-ttl=86400
geo-ip-map-zonefile=/home/ze/tmp/pdns/etc/geo1/zz.countries.nerd.dk.rbldnsd
geo-maps=/home/ze/tmp/pdns/etc/geo1

geo-geo2-zone=example.net
geo-geo2-soa-values=ns1.example.net,postmaster.example.net
geo-geo2-ns-records=ns1.example.net,ns2.example.net
geo-geo2-ttl=3600
geo-geo2-ns-ttl=86400
geo-geo2-ip-map-zonefile=/home/ze/tmp/pdns/etc/geo2/zz.countries.nerd.dk.rbldnsd
geo-geo2-maps=/home/ze/tmp/pdns/etc/geo2


In my setup, I got this message "[geobackend] Error occured while reading
director file /home/ze/tmp/pdns/etc/geo2/zz.countries.nerd.dk.rbldnsd:
$RECORD line empty or missing, georecord qname unknown"

Well, since I just "touch"
the /home/ze/tmp/pdns/etc/geo2/zz.countries.nerd.dk.rbldnsd, it's ok.

Again, I didn't test the server, I just made the configuration work.
Post by José Arthur Benetasso Villanova
Post by José Arthur Benetasso Villanova
Hi Đức.
launch=geo:geo1,geo:geo2
geo1-zone=geo.domain1.net
geo2-zone=geo.domain2.net
Basically, you need to tell to PowerDNS that those are different
configuration, much like kernel modules alias.
http://doc.powerdns.com/modules.html
Post by José Arthur Benetasso Villanova
I hope this help.
Sorry for braking thread, but is that possible to get geo backend
domains from database?
For example i want to create on the fly some domains what have geo
part and redirect users for specific ip based on geo.
--
Vasiliy Tolstov,
Clodo.ru
--
José Arthur Benetasso Villanova
Đức Vinh Hồ
2012-03-01 01:14:27 UTC
Permalink
Thanks again to your pdns.conf file, it give me a better acknowledge about
PDNS. But can you attach your pdns-source.tar.gz (including geobackend
patched) to me ? And i will reinstall PDNS with multi-geo-backend by your
pdns-source.
Or you can show me how to config the patch file ? There're something in the
patch file that i don't understand. Such as :

diff --git a/modules/geobackend/geobackend.cc
b/modules/geobackend/geobackend.cc
index 0a79099..1624ef9 100644
--- a/modules/geobackend/geobackend.cc
+++ b/modules/geobackend/geobackend.cc
@@ -25,17 +25,7 @@ using boost::trim_right;

If i downloaded the lastest pdns source from the official website, how can
i use your patched file ? (i mention about how to patching this file into
the pdns-source and reinstall it)

Thanks a lot José !
Post by José Arthur Benetasso Villanova
Hi again.
You are right, the 1st module can't be an alias.
I've tried to recompile the patch and configure it once again. So far, I
just made the configuration work, I didn't test the entire settings. Here
launch=geo,geo:geo2
geo-zone=example.com
geo-soa-values=ns1.example.com,postmaster.example.com
geo-ns-records=ns1.example.com,ns2.example.com
geo-ttl=3600
geo-ns-ttl=86400
geo-ip-map-zonefile=/home/ze/tmp/pdns/etc/geo1/zz.countries.nerd.dk.rbldnsd
geo-maps=/home/ze/tmp/pdns/etc/geo1
geo-geo2-zone=example.net
geo-geo2-soa-values=ns1.example.net,postmaster.example.net
geo-geo2-ns-records=ns1.example.net,ns2.example.net
geo-geo2-ttl=3600
geo-geo2-ns-ttl=86400
geo-geo2-ip-map-zonefile=/home/ze/tmp/pdns/etc/geo2/zz.countries.nerd.dk.rbldnsd
geo-geo2-maps=/home/ze/tmp/pdns/etc/geo2
In my setup, I got this message "[geobackend] Error occured while reading
$RECORD line empty or missing, georecord qname unknown"
Well, since I just "touch"
the /home/ze/tmp/pdns/etc/geo2/zz.countries.nerd.dk.rbldnsd, it's ok.
Again, I didn't test the server, I just made the configuration work.
Post by José Arthur Benetasso Villanova
Post by José Arthur Benetasso Villanova
Hi Đức.
launch=geo:geo1,geo:geo2
geo1-zone=geo.domain1.net
geo2-zone=geo.domain2.net
Basically, you need to tell to PowerDNS that those are different
configuration, much like kernel modules alias.
http://doc.powerdns.com/modules.html
Post by José Arthur Benetasso Villanova
I hope this help.
Sorry for braking thread, but is that possible to get geo backend
domains from database?
For example i want to create on the fly some domains what have geo
part and redirect users for specific ip based on geo.
--
Vasiliy Tolstov,
Clodo.ru
--
José Arthur Benetasso Villanova
Loading...