<div dir="ltr"><div>Thanks a lot, got it.<br><br></div><div>H. Zhao<br></div><br>Regards</div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-23 16:50 GMT+08:00 W.C.A. Wijngaards <span dir="ltr"><<a href="mailto:wouter@nlnetlabs.nl" target="_blank">wouter@nlnetlabs.nl</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<br>
Hi Hongyi,<br>
<span class=""><br>
On 23/02/15 03:49, Hongyi Zhao wrote:<br>
> Hi all,<br>
><br>
> Currently, I use the latest release of unbound 1.5.2 compilled by<br>
> myself on the Debian wheezy. I configured the unbound by some<br>
> using some forward-zone sections in its unbound.conf file, and let<br>
> it listen on the local 1052 port to listen on for queries.<br>
><br>
> Now, I want to use the unbound-control tool to do some tests, say,<br>
> cleaning some type of record in the cache, say, the A record, by<br>
> using the following command:<br>
><br>
> $ sudo unbound-control -c<br>
> /home/werner/software/anti-gfw/anti-DNS-cache-poisoning/final-methods/unbound.conf<br>
><br>
><br>
flush A<br>
<br>
</span>You flush here the domain-name "A". The command expects a domain<br>
name, so like: flush <a href="http://example.com" target="_blank">example.com</a> removes the <a href="http://example.com" target="_blank">example.com</a> A record.<br>
<br>
Best regards,<br>
Wouter<br>
<span class=""><br>
> But I failed to clean the cache, please see following for detail:<br>
><br>
> -------------- begin test ------------------------------<br>
</span>> werner@debian:~$ dig -p1052 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>><br>
><br>
> ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> -p1052 <a href="http://youtube.com" target="_blank">youtube.com</a><br>
> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>> ;; global options: +cmd ;; Got answer: ;;<br>
<span class="">> ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20966 ;; flags: qr<br>
> rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 0<br>
><br>
</span>> ;; QUESTION SECTION: ;<a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> IN A<br>
><br>
> ;; ANSWER SECTION: <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>. 3600<br>
> IN A <a href="tel:173.194.127.40" value="+17319412740">173.194.127.40</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.38" value="+17319412738">173.194.127.38</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.41" value="+17319412741">173.194.127.41</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.35" value="+17319412735">173.194.127.35</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.39" value="+17319412739">173.194.127.39</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.46" value="+17319412746">173.194.127.46</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.37" value="+17319412737">173.194.127.37</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.32" value="+17319412732">173.194.127.32</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.34" value="+17319412734">173.194.127.34</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3600 IN A <a href="tel:173.194.127.36" value="+17319412736">173.194.127.36</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
<span class="">> 3600 IN A <a href="tel:173.194.127.33" value="+17319412733">173.194.127.33</a><br>
><br>
> ;; Query time: 715 msec ;; SERVER: 127.0.0.1#1052(127.0.0.1) ;;<br>
> WHEN: Mon Feb 23 10:33:41 2015 ;; MSG SIZE rcvd: 205<br>
><br>
> werner@debian:~$ sudo unbound-control -c<br>
> /home/werner/software/anti-gfw/anti-DNS-cache-poisoning/final-methods/unbound.conf<br>
><br>
><br>
flush A<br>
</span>> ok werner@debian:~$ dig -p1052 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>> ;<br>
> <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> -p1052 <a href="http://youtube.com" target="_blank">youtube.com</a><br>
> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>> ;; global options: +cmd ;; Got answer: ;;<br>
<span class="">> ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22618 ;; flags: qr<br>
> rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 0<br>
><br>
</span>> ;; QUESTION SECTION: ;<a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> IN A<br>
><br>
> ;; ANSWER SECTION: <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>. 3584<br>
> IN A <a href="tel:173.194.127.40" value="+17319412740">173.194.127.40</a> <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.38 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.41 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.35 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.39 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.46 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.37 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.32 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.34 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
> 3584 IN A 173.194.127.36 <a href="http://youtube.com" target="_blank">youtube.com</a> <<a href="http://youtube.com" target="_blank">http://youtube.com</a>>.<br>
<span class="">> 3584 IN A 173.194.127.33<br>
><br>
> ;; Query time: 0 msec ;; SERVER: 127.0.0.1#1052(127.0.0.1) ;; WHEN:<br>
> Mon Feb 23 10:33:57 2015 ;; MSG SIZE rcvd: 205 -------------- end<br>
> test ------------------------------<br>
><br>
> As you can see, after I've done the flush operation on the A<br>
> record, the 2nd dig command still can fetech the cached A records<br>
> -- "the Query time: 0 msec" of the 2nd run of dig should tell<br>
> this.<br>
><br>
> Why does this happen? Could someone please give me some hints?<br>
><br>
> Regards -- Hongyi Zhao <<a href="mailto:hongyi.zhao@gmail.com">hongyi.zhao@gmail.com</a><br>
</span>> <mailto:<a href="mailto:hongyi.zhao@gmail.com">hongyi.zhao@gmail.com</a>>> Xinjiang Technical Institute of<br>
<span class="">> Physics and Chemistry Chinese Academy of Sciences GnuPG DSA:<br>
> 0xD108493<br>
><br>
><br>
</span>> _______________________________________________ Unbound-users<br>
> mailing list <a href="mailto:Unbound-users@unbound.net">Unbound-users@unbound.net</a><br>
> <a href="http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users" target="_blank">http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users</a><br>
><br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1<br>
<br>
iQIcBAEBCAAGBQJU6unLAAoJEJ9vHC1+BF+NjBwP/i250ZVWggolI/h+T0HvbZ9z<br>
wSrBVqwaUndkRCvR+orRJft93gP/4UxERAH4OLuSri1hysVZrb8z4U8whttJrmzA<br>
hoZM+z2OEtpHdWYWKJPdDDrztiQ9pLRdjvaYFplzoyNrKAVCsFju2WX+atglrMKH<br>
du6+AP0T0PtaKW27fjna8kwnz2Rm/i04GB3Qj0vTdIz/g4r68s4l9Eeh5K1cf47M<br>
vZGq7TCuc50kpFy9VdqKKXv65bYPCz2OG+Kv6b0LF3JgfbozE8+h5yANDIgTTUXL<br>
1yNeKPkHDV+pOrpM/ZPoX4IM4YusQ1U8lqUQ1jbIMkeSnwvCGCmlnGb5D6h12C09<br>
xXx/nIY0SiaHQZFqsaYhoa9ixThs2HpIcu+2LOpyW/aoJykDNP1GzNPoBRQTbPy+<br>
ap2KQnivvWUaYTe9tK0aaYNXRfOyOXQHAjXuQIjU/rgKlcX+4fjYyIORzfFVdGfz<br>
uoqdbcflnEeeWQ8xF2SS7fq4PWDy8jMMGhOMpXoLIlFnDVc8IGGYaQfu9zvLuBhj<br>
tgvLBEtIxJ/xq7I5lgduQXVwKVICT3/1n5ev4N4eBBhNRCgBYQsjPrFepQFJocms<br>
xs7yj3O9w/trOxOgYso0LVOVeonu6x5zV4qZpE8RUPCekohcXfFfvZ83oFAfRXbx<br>
68HQCK0vFtvB+bO6u4B9<br>
=fRai<br>
-----END PGP SIGNATURE-----<br>
_______________________________________________<br>
Unbound-users mailing list<br>
<a href="mailto:Unbound-users@unbound.net">Unbound-users@unbound.net</a><br>
<a href="http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users" target="_blank">http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Hongyi Zhao <<a href="mailto:hongyi.zhao@gmail.com">hongyi.zhao@gmail.com</a>> <br>Xinjiang Technical Institute of Physics and Chemistry<br>Chinese Academy of Sciences <br>GnuPG DSA: 0xD108493</div>
</div>