0

I made a quick dns2 (javascript) dns server, it all seems to work well on port 5333 (the server is logging requests meaning its working, but when I use port 53 the dog commands works too (for 53) but the server doesn't log anything, this happens for my dedicated server as well as my vps. I used dig on an external machine

Without running the dns2 server the dig command seems to work properly too. What can I do to make my dns server work at 53? Nothing else is using 53

mikolll
  • 43
  • 5

1 Answers1

0

If your DNS server runs under non-root account, you need to allow access to privileged ports for your program with the command:

setcap 'cap_net_bind_service=+ep'<program-file-name>

See this post for more details.

olegarch
  • 3,670
  • 1
  • 20
  • 19
  • I use sudo, my dns server turns on just fine, but it doesn't seem to be receiving the requests and looks like someone "in the middle" is receiving them. Even if my server is off the requests are received, ideas? – mikolll Feb 18 '22 at 06:56
  • Try to see,wich program liastening your port 53 (DNS): sudo netstat -tulpn | grep LISTEN – olegarch Feb 19 '22 at 17:57
  • Nothing there, even if the server is off then the dns works – mikolll Feb 20 '22 at 21:35