nginx will now handle plain dns requests

This commit is contained in:
minoplhy 2021-09-13 08:59:49 +07:00
parent 3441faef15
commit cb9c6075bb
3 changed files with 14 additions and 5 deletions

View File

@ -7,8 +7,6 @@ log_level('info')
-- Network interface configuration
net.listen('127.0.0.1', 5353, { kind = 'dns' })
net.listen('::1', 5353, { kind = 'dns', freebind = true })
net.listen('0.0.0.0', 53, { kind = 'dns' })
net.listen('::', 53, { kind = 'dns', freebind = true })
-- Load useful modules

View File

@ -7,9 +7,6 @@ log_level('info')
-- Network interface configuration
net.listen('127.0.0.1', 5353, { kind = 'dns' })
net.listen('::1', 5353, { kind = 'dns', freebind = true })
net.listen('0.0.0.0', 53, { kind = 'dns' })
net.listen('::', 53, { kind = 'dns', freebind = true })
-- Load useful modules
modules = {

View File

@ -0,0 +1,14 @@
# DNS (TCP) server
server {
listen 53;
listen [::]:53;
proxy_pass dns;
}
# DNS (UDP) server
server {
listen 53 udp;
listen [::]:53 udp;
proxy_responses 1;
proxy_pass dns;
}