cbuijs / unbound-dns-firewall

DNS-Firewall Python script for UNBOUND
GNU General Public License v3.0
25 stars 8 forks source link

Ability to redirect based on responses #9

Closed cbuijs closed 6 years ago

cbuijs commented 6 years ago

Have same feature as for queries either a redirected IP or REFUSED.

cbuijs commented 6 years ago

Seems to be same as with module state NEW/PASS state using "answer.append" to complement outstanding query with redirect or refuse. But use in module state DONE fabricate a new message from scratch? Or replace the answer (and authority/additional) section all together?

cbuijs commented 6 years ago

Now with caching we need this more. At first hit as a response, and if blacklisted, the QNAME and RESPONSE get cached. Initial query will generate a REFUSED based on the response. Any consecutive queries will be REDIRECTED (if used). We rather want redirection from the first hit.

cbuijs commented 6 years ago

Works since 4.5