node-named
node-named copied to clipboard
bind to default DNS port?
var named = require('node-named');
var server = named.createServer();
server.listen(53, '192.168.0.4', function() {
console.log('DNS server started on port 53');
});
server.on('query', function(query) {
console.log(query.name());
});
foo:dns brandonros$ sudo node app.js
events.js:160
throw er; // Unhandled 'error' event
^
Error: bind EINVAL 192.168.0.4:53
@brandonros Same problem. Running as administrator doesn't help.
UPD. It doesn't matter what port do you use. It doesn't work at all. The reason are two rows in server.js that contain udp6 that creates problems with this version of Node.js and Windows. Replace them with udp4 to make it work.