<div dir="ltr">You could run unbound on the squid host (or elsewhere) and use this config to drop all AAAA requests.<div>It utilises unbound's ability to include custom python scripts.<br><br><a href="https://github.com/berstend/unbound-no-aaaa">https://github.com/berstend/unbound-no-aaaa</a><br><br>Configure unbound to forward all other DNS requests to your existing nameservers and reconfigure squid to use unbound via the dns_nameservers directive.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 10, 2021 at 11:58 AM Amos Jeffries <<a href="mailto:squid3@treenet.co.nz">squid3@treenet.co.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/06/21 11:42 am, Alex Rousskov wrote:<br>
> On 6/9/21 6:16 PM, Ambrose Li wrote:<br>
>> On Wed, Jun 09, 2021 at 12:05:40PM -0400, Alex Rousskov wrote:<br>
>>> Not that I know of. You can implement this logic inside a custom DNS<br>
>>> resolver script, or you can reconfigure Squid whenever your outgoing<br>
>>> addresses change, but I understand that you are looking for a better<br>
>>> solution.<br>
> <br>
>> What are the current recommendations for custom DNS resolver scripts?<br>
> <br>
> I was talking about a custom script that implements a custom DNS<br>
> resolver. With modern libraries, it takes a few lines of code to write a<br>
> basic one. This kind of resolver does not resolve most of the names, but<br>
> forwards queries to another/real resolver, adapting the queries and/or<br>
> the answers as needed.<br>
> <br>
> For an oversimplified example, such a script can respond to all AAAA<br>
> queries (with answers containing no records) while forwarding all A<br>
> queries to a "real" resolver.<br>
> <br>
<br>
Should be no need for any custom scripts or Squid config at all for this.<br>
<br>
The Bind9 filter-aaaa* feature does it already without wasting network <br>
bandwidth delivering ignored response fields. Other recursive resolvers <br>
should all have equivalent features too.<br>
<br>
<br>
Amos<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>