<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Christophe,<br></div>
<div> </div>
<div>perhaps you can use python-ldns bindings to manipulate wireformat?<br></div>
<div> </div>
<div>Cheers,<br></div>
<div>Ondrej<br></div>
<div> </div>
<div>On Mon, Oct 27, 2014, at 02:00, Christophe Labonne wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>Bill Manning << You don't understand. It's not a problem for me as a client, it's a problem for me as a worker at an internet provider. I have to implement something totally broken because of what NTT did.<br></div>
<div> </div>
<div>Daisuke Higashi << There is one little problem though: We would have to write all IPv6 domains by hand in the configuration file.<br></div>
<div> </div>
<div>In the end, I found that the only way to do this is to use the Python API. But because Unbound doesn't offer any method to actually get the result of the original query, I have to wait for the MODULE_EVENT_MODDONE to get the result of the query and to be able to modify it. But then, because RRData is all in wireformat, I have to convert all of them by hand which will take a lot of effort to implement...<br></div>
</div>
<div><div> </div>
<div defang_data-gmailquote="yes"><div>2014-10-25 4:11 GMT+09:00 Daisuke HIGASHI <span dir="ltr"><<a href="mailto:daisuke.higashi@gmail.com" target="_blank">daisuke.higashi@gmail.com</a>></span>:<br></div>
<blockquote defang_data-gmailquote="yes" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi, Christophe -<br></div>
<div> </div>
<div>
In unbound.conf:<br></div>
<div> </div>
<div>
private-address: ::/0<br></div>
<div>
private-domain: <a href="http://iptvf.jp" target="_blank">iptvf.jp</a><br></div>
<div>
private-domain: <a href="http://flets-east.jp" target="_blank">flets-east.jp</a><br></div>
<div> </div>
<div>
returns no AAAA unless query name is <a href="http://iptvf.jp" target="_blank">iptvf.jp</a> or <a href="http://flets-east.jp" target="_blank">flets-east.jp</a>.<br></div>
<div> </div>
<div>
Note that it also removes AAAA from IPv6(AAAA)-only domain name.<br></div>
<div>
This is slighly differs from BIND9's AAAA-ftiler's behavior.<br></div>
<div> </div>
<div>
Regards,<br></div>
<div>
--<br></div>
<div>
Daisuke HIGASHI<br></div>
<div><div> </div>
<div> </div>
<div>
2014-10-24 12:46 GMT+09:00 Christophe Labonne <<a href="mailto:galaf77@gmail.com">galaf77@gmail.com</a>>:<br></div>
<div>
> Hello,<br></div>
<div>
><br></div>
<div>
> I work for a japanese internet provider and I would like to get some help<br></div>
<div>
> with the Python module I am currently working on.<br></div>
<div>
><br></div>
<div>
> Because of the way internet works in Japan, I need to filter the DNS<br></div>
<div>
> requests so that it doesn't show AAAA except for a few websites (as such, I<br></div>
<div>
> can't just use the parameter in the config file).<br></div>
<div>
><br></div>
<div>
> So I decided to build a Python module that would make it possible. Problem<br></div>
<div>
> is, it seems like I can modify the return_msg only when in event ==<br></div>
<div>
> MODULE_EVENT_NEW.<br></div>
<div>
><br></div>
<div>
> I do not wish to create data from the ground up, I would just like to modify<br></div>
<div>
> the existing answer.<br></div>
<div>
> The only way to do that would be to create a DNSMessage during event ==<br></div>
<div>
> MODULE_EVENT_MODDONE.<br></div>
<div>
><br></div>
<div>
> But if I do that, set_return_msg fails and returns 0.<br></div>
<div>
><br></div>
<div>
> Is there a way to create a DNSMessage during MODULE_EVENT_MODDONE?<br></div>
<div>
> Or is there a way to get original data during MODULE_EVENT_NEW so that I can<br></div>
<div>
> parse it?<br></div>
<div>
><br></div>
<div>
> I've been working on it for a day now and I just don't seem to find a good<br></div>
<div>
> way to do this.<br></div>
<div>
> (And yes, I know it's a weird thing to do but can't argue with the national<br></div>
<div>
> way of doing things)<br></div>
<div>
><br></div>
<div>
> I hope you guys can give me an answer and I wish you a good day.<br></div>
<div>
><br></div>
<div>
> Christophe<br></div>
<div>
><br></div>
</div>
<div><div>> _______________________________________________<br></div>
<div>
> Unbound-users mailing list<br></div>
<div>
> <a href="mailto:Unbound-users@unbound.net">Unbound-users@unbound.net</a><br></div>
<div>
> <a href="http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users" target="_blank">http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users</a><br></div>
</div>
</blockquote></div>
<div> </div>
<div> </div>
<div> </div>
<div>-- <br></div>
<div dir="ltr">LABONNE Christophe<br></div>
</div>
<div><u>_______________________________________________</u><br></div>
<div>Unbound-users mailing list<br></div>
<div><a href="mailto:Unbound-users@unbound.net">Unbound-users@unbound.net</a><br></div>
<div><a href="http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users">http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users</a><br></div>
</blockquote><div> </div>
<div id="sig19640473"><div class="signature">--<br></div>
<div class="signature">Ondřej Surý <ondrej@sury.org><br></div>
<div class="signature">Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server<br></div>
<div class="signature"> </div>
</div>
<div> </div>
</body>
</html>