<div dir="ltr"><div><div><div>dnsmasq correctly filters A records containing RFC1918 addresses like 192.168.2.1, however, it doesn't check AAAA records containing IPv4-mapped IPv6 addresses.<br><br></div>For example, enable DNS rebinding prevention, and do:<br><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">$ host <a href="http://router.saynotolinux.com">router.saynotolinux.com</a><br></blockquote><br></div><div>nothing will be returned, but <br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">$ host <a href="http://routerv4mapped.saynotolinux.com">routerv4mapped.saynotolinux.com</a><br></blockquote><br></div><div>returns<br></div><div><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><a href="http://routerv4mapped.saynotolinux.com">routerv4mapped.saynotolinux.com</a> has IPv6 address ::ffff:192.168.2.1<br></blockquote><br></div><div>Some IP stacks (Linux's, at least) will take that AAAA record and connect to 192.168.2.1 directly via IPv4.<br><br></div><div>Here's how google-dnswall deals with them: <a href="https://code.google.com/p/google-dnswall/source/browse/trunk/src/check_record.c#83">https://code.google.com/p/google-dnswall/source/browse/trunk/src/check_record.c#83</a><br><br></div><div>We should also filter IPv4-compatible addresses (also in the dnswall example,) but I haven't been able to find anything that actually supports them anymore.<br><br></div><div>Cheers,<br></div><div> - Jordan<br></div></div>