Self sign-up has been disabled due to increased spam activity. If you want to get access, please send an email to a project owner (preferred) or at gitlab(at)nic(dot)cz. We apologize for the inconvenience.
Redirection using CNAMEs from RPZ is useful for redirecting blocked domains to an user-controlled domain. The user-controlled domain can e.g. have SPF record which blocks e-mails on SMTP level, which helps with phising and spam domains a lot.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
I use the following (does not handle TXT yet but should be easy to add):
-- RPZ-- custom responselocalfunctionmkauth_soa(answer,dname,mname)ifmname==nilthenmname=dnameendreturnanswer:put(dname,900,answer:qclass(),kres.type.SOA,mname..'\6nobody\7invalid\0\0\0\0\0\0\0\14\16\0\0\3\132\0\9\58\128\0\0\3\132')endlocalffi=require('ffi')localfunctiongenRR(state,req)localanswer=req.answerlocalqry=req:current()ifqry.stype==kres.type.Athenffi.C.kr_pkt_make_auth_header(answer)answer:rcode(kres.rcode.NOERROR)answer:begin(kres.section.ANSWER)answer:put(qry.sname,900,answer:qclass(),kres.type.A,'\192\168\2\1')answer:begin(kres.section.AUTHORITY)mkauth_soa(answer,'\7blocked\0')returnkres.DONEelseifqry.stype==kres.type.AAAAthenffi.C.kr_pkt_make_auth_header(answer)answer:rcode(kres.rcode.NOERROR)answer:begin(kres.section.ANSWER)answer:put(qry.sname,900,answer:qclass(),kres.type.AAAA,'\032\001\013\184\0\0\0\0\0\0\0\0\0\0\0\1')answer:begin(kres.section.AUTHORITY)mkauth_soa(answer,'\7blocked\0')returnkres.DONEelsereturnstateendend-- rpz policy: respond with custom function genRRpolicy.add(policy.rpz(genRR,'/etc/kresd/rpz.custom.zone'))
Note: I use redirect instead of NXDOMAIN because in my experience web browser ad-blocking implemented at the DNS level is faster if the web browser can send the HTTP request somewhere. I typically use an IP address on the local lan.
Another "user" interested in this: adblock package. The workaround above won't work in that case, as different names need to be redirected to different targets.
Just a comment in support of this feature. An example use case is the redirection of search engines to their safe search flavours (e.g. forcesafesearch.google.com and restrict.youtube.com).