These are chat archives for CZ-NIC/knot-resolver

24th
Aug 2018
Petr Špaček
@pspacek
Aug 24 2018 11:16
If I understand you correctly, you want to redirect everything to 127.0.0.1. In that case you should be rewritting only resource records with type A and nothing else. If you overwrite the other types the data format will not match and it will cause problems either in resolver or on client side.
I would recommend you to modify code to go though all RRs in answer and to re-write only type A RRs in place.
Similar thing can be done for AAAA type (using appropriate data format).
It should produce answer which has all non-address types like CNAME, MX. etc. intact but all IP addresses will point to your sinkhole.
E.g.
www.example.com. CNAME target.example.com.
target.example.com. A 127.0.0.1