[Unbound-users] Modifying answer with the Python API

Daisuke HIGASHI daisuke.higashi at gmail.com
Fri Oct 24 19:11:46 UTC 2014


Hi, Christophe -

In unbound.conf:

  private-address: ::/0
  private-domain:  iptvf.jp
  private-domain:  flets-east.jp

returns no AAAA unless query name is iptvf.jp or flets-east.jp.

Note that it also removes AAAA from IPv6(AAAA)-only domain name.
This is slighly differs from BIND9's AAAA-ftiler's behavior.

Regards,
--
 Daisuke HIGASHI


2014-10-24 12:46 GMT+09:00 Christophe Labonne <galaf77 at gmail.com>:
> Hello,
>
> I work for a japanese internet provider and I would like to get some help
> with the Python module I am currently working on.
>
> Because of the way internet works in Japan, I need to filter the DNS
> requests so that it doesn't show AAAA except for a few websites (as such, I
> can't just use the parameter in the config file).
>
> So I decided to build a Python module that would make it possible. Problem
> is, it seems like I can modify the return_msg only when in event ==
> MODULE_EVENT_NEW.
>
> I do not wish to create data from the ground up, I would just like to modify
> the existing answer.
> The only way to do that would be to create a DNSMessage during event ==
> MODULE_EVENT_MODDONE.
>
> But if I do that, set_return_msg fails and returns 0.
>
> Is there a way to create a DNSMessage during MODULE_EVENT_MODDONE?
> Or is there a way to get original data during MODULE_EVENT_NEW so that I can
> parse it?
>
> I've been working on it for a day now and I just don't seem to find a good
> way to do this.
> (And yes, I know it's a weird thing to do but can't argue with the national
> way of doing things)
>
> I hope you guys can give me an answer and I wish you a good day.
>
> Christophe
>
> _______________________________________________
> Unbound-users mailing list
> Unbound-users at unbound.net
> http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users



More information about the Unbound-users mailing list