Comments (2)
Hopefully I'm not too late, but I just tested, you can edit any and all headers of a response before sending it.
So before you send(response), you just need to set response.header.rcode to either 3 or 0x03(both are treated as 3 by javascript it seems) and DiG/DNS queries will report NXDOMAIN.
Any server-side logic on determining when to send/what to do when receiving an NXDOMAIN is up to you though.
Here's a good resource on all of the headers and their options for a DNS response
from node-dns.
Thanks for the info
from node-dns.
Related Issues (20)
- Response AAAA does not encode IPv6 Addresses with :: HOT 1
- Force IPv4 HOT 1
- How to send NX Domain HOT 1
- Requester's IP HOT 5
- The idea of rate limiting HOT 1
- Bad Typescript usage HOT 1
- Hi there, trying to get NS entries to work... HOT 1
- GeoDNS HOT 2
- UDP Server Type should be configurable (udp4 or udp6) HOT 3
- use for DNS01 challenges? HOT 2
- malformed ipv6 HOT 2
- Server stopping instantly? HOT 1
- How to send SRV records? HOT 4
- server sends response only when closing server HOT 1
- Max RPS
- Get SOA records
- Wrong response formatting for type AAAA HOT 4
- Intermittent long pauses when running as server
- Proxy protocol support
- EDNS Client Subnet (ECS) does not work with `resolve`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-dns.