Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dnsdist] Enhance domain spoofing #3064

Closed
janeczku opened this issue Dec 18, 2015 · 1 comment
Closed

[dnsdist] Enhance domain spoofing #3064

janeczku opened this issue Dec 18, 2015 · 1 comment

Comments

@janeczku
Copy link

This is request for enhancing domain spoofing:

  1. SpoofAction should accept a FQDN alternatively to an IPv4 in which case the response would return a CNAME record.
  2. Allow Lua actions to spoof queries programmatically. Currently we can send queries to pools from within a Lua action (return DNSAction.Pool, "abuse"). The same should be possible for the SpoofAction:
function luarule(remote, qname, qtype, dh, len)
        if(qtype==35) -- NAPTR
        then
                return DNSAction.Spoof, "192.168.0.1" -- spoof domain
        else
                return DNSAction.None, ""
        end
end
@janeczku janeczku changed the title [dnsdist] Allow addDomainSpoof() to return a CNAME record [dnsdist] Enhance domain spoofing Dec 19, 2015
@pieterlexis pieterlexis added this to the dnsdist-1.0.0 milestone Dec 21, 2015
rgacogne added a commit to rgacogne/pdns that referenced this issue Jan 4, 2016
- Add addDomainCNAMESpoof() and SpoofCNAMEAction()
- Check that we have enough space in the buffer to write the response
- Implement the first part of PowerDNS#3064
rgacogne added a commit to rgacogne/pdns that referenced this issue Jan 5, 2016
- Add addDomainCNAMESpoof() and SpoofCNAMEAction()
- Check that we have enough space in the buffer to write the response
- Implement the first part of PowerDNS#3064
rgacogne added a commit to rgacogne/pdns that referenced this issue Jan 15, 2016
DNSAction.Spoof can be used to return a spoofed response from
a Lua rule. It supports an IPv4 (A), IPv6 (AAAA) or a DNSName
(CNAME).
SpoofAction() can be used IPv6-only, by passing a IPv6 as the
first parameter. It now supports spoofing IPv4-only, IPv6-only,
IPv4 and IPv6, and CNAME.
Closes PowerDNS#3064.
@rgacogne rgacogne self-assigned this Jan 15, 2016
@janeczku
Copy link
Author

@rgacogne good job! 🎉😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants