node-named icon indicating copy to clipboard operation
node-named copied to clipboard

bind to default DNS port?

Open brandonros opened this issue 8 years ago • 1 comments

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 avatar Feb 03 '17 00:02 brandonros

@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.

reverofevil avatar Apr 13 '17 15:04 reverofevil