Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
BIND - Need Port setting for DNS Forwarders
« previous
next »
Print
Pages: [
1
]
Author
Topic: BIND - Need Port setting for DNS Forwarders (Read 3804 times)
Bytechanger
Full Member
Posts: 239
Karma: 0
BIND - Need Port setting for DNS Forwarders
«
on:
September 03, 2020, 05:30:21 pm »
Hi,
I want to forward DNS-Requests from BIND to DNSCrypt-Proxy.
But BIND only allow to set IP-Adresses ipv4 and ipv6 without special Port.
I want to forward to 127.0.0.1:5353 and [::1]:5353
but this is only possible by editing /usr/local/etc/namedb/named.conf.
But when system is change settings, the config will be overwritten
and in my network, no dns is possible....
Is there a workaround or future-request to set ports to forward-adresses ?
Greets
Byte
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: BIND - Need Port setting for DNS Forwarders
«
Reply #1 on:
September 03, 2020, 07:02:12 pm »
imo for workaround (if you plan to request this feature) you can play with template
i think its
/usr/local/opnsense/service/templates/OPNsense/Bind/named.conf
and set port there
Logged
Bytechanger
Full Member
Posts: 239
Karma: 0
Re: BIND - Need Port setting for DNS Forwarders
«
Reply #2 on:
September 03, 2020, 07:57:22 pm »
Yes, I wrote this as workaround.
But, when you push SAVE on BIND settings, or somthing is going on on opnsense (restart or else) its overwritten and my network has no DNS-Server.
Greets
Byte
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: BIND - Need Port setting for DNS Forwarders
«
Reply #3 on:
September 03, 2020, 08:10:43 pm »
are you sure you read the path carefully?
its template. its not overwritten ever (plugin reinstall does not count). it contains instrutions to fill .conf based on settings
«
Last Edit: September 03, 2020, 08:18:49 pm by Fright
»
Logged
Bytechanger
Full Member
Posts: 239
Karma: 0
Re: BIND - Need Port setting for DNS Forwarders
«
Reply #4 on:
September 03, 2020, 09:26:08 pm »
OK, thanks,
found
{% if helpers.exists('OPNsense.bind.general.forwarders') and OPNsense.bind.general.forwarders != '' %}
forwarders { {{ OPNsense.bind.general.forwarders.replace(',', '; ') }}; };
and replaced forwarders line to:
forwarders { 127.0.0.1 port 5353; ::1 port 5353; };
that seems to work!
Greets
Byte
Logged
milkman
Newbie
Posts: 1
Karma: 0
Re: BIND - Need Port setting for DNS Forwarders
«
Reply #5 on:
November 16, 2020, 03:04:47 am »
I originally modified the BIND template to accomplish this exact same setup of BIND forwarding to dnscrypt-proxy, but decided to go another route.
I added an IP Alias to interface Loopback of 127.0.0.2, then modified dnscrypt-proxy to listen on 127.0.0.2:53 and ticked the "Allowed Privleged Ports" option, works a treat!
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
BIND - Need Port setting for DNS Forwarders