Use as DHCP server with Custom DNS server

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
zenithangunn
DD-WRT Novice


Joined: 14 Dec 2014
Posts: 6

PostPosted: Mon Oct 15, 2018 18:24    Post subject: Use as DHCP server with Custom DNS server Reply with quote
Good afternoon! I need some help setting up a custom DHCP scenario and everything I've found online hasn't quite helped yet.

Goal:
DHCP from router issues IPv4 and IPv6 addresses with custom DNS servers
DNS IPv4: 192.168.11.250
DNS IPv6: fe80::211:32ff:fe3e:ead9

Currently I have DHCP working for both IPv4 and IPv6 and it issues the right IPv6 DNS server but I can't stop the router from issueing 192.168.11.1 (it's own IP) as the DNS server for IPv4. What I'd like is the DHCP server just issues the DNS server I want and not itself. The router's own DNS functions might as well be turned off. IPv6 via Comcast appears to work perfectly as well finally so I just really need the DHCP service to issue my custom IPv4 DNS server setting instead of itself. Thank you!

DD WRT: DD-WRT v3.0-r37305 std 10/10/18

Current settings:

Basic Setup:
DHCP Type: Server
DHCP Server: Enabled
Start IP: 192.168.11.100
Static DNS 1: 192.168.11.250
Static DNS 2: 198.153.194.1
Static DNS 3: 0.0.0.0
WinS: 0.0.0.0
Use DNSMasq for DHCP: YES
Use DNSMasq for DNS: YES
DHCP-Authoritative: YES
Recursive DNS Resolving: YES
Forced DNS Redirection: NO

IPv6:
IPv6: Enabled
IPv6 Type: DHCPv6 with Prefix Delegation
Prefix Length: 64
Static DNS 1: fe80::211:32ff:fe3e:ead9
Static DNS 2: 2620:0:ccc::2
MTU: 1500
DHCP6c Custom: Disabled
DHCP6s: Disabled
Radvd: Disabled

Services:
LAN domain: freezegunn.com
Use NVRAM for client lease DB: Disabled
DNSMasq: Enabled
Cache DNSSEC data: Enabled
Local DNS: Disabled
No DNS Rebind: Enabled
Query DNS in Strict Order: Enable
Add Requestor MAC to DNS Query: Disable
RFC4039 Rapid Commit support: Enable

Additional DNSMasq Options:
domain=freezegunn.com
local=/freezegunn.com/
expand-hosts
interface=br0
dhcp-range=::1000,::FFFF,constructor:br0,ra-stateless,12h
dhcp-option=option6:dns-server,[fe80::211:32ff:fe3e:ead9]
ra-param=br0,10,300
enable-ra
quiet-ra
quiet-dhcp
quiet-dhcp6
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6866
Location: Romerike, Norway

PostPosted: Mon Oct 15, 2018 20:10    Post subject: Reply with quote
You have Local DNS: Disabled

Is your goal to have a local dns server that resolves local resources?
zenithangunn
DD-WRT Novice


Joined: 14 Dec 2014
Posts: 6

PostPosted: Mon Oct 15, 2018 21:52    Post subject: Reply with quote
My goal is DHCP issued from DD WRT contains these two DNS servers:

DNS IPv4: 192.168.11.250 (NAS device with DNS Services)
DNS IPv6: fe80::211:32ff:fe3e:ead9

The router's own DNS services can be disabled completely.
zenithangunn
DD-WRT Novice


Joined: 14 Dec 2014
Posts: 6

PostPosted: Tue Oct 16, 2018 16:08    Post subject: Reply with quote
Another solution would be to leave the router DNS functions active but make DHCP offer my preferred DNS server 1st and the Router's IP for DNS IP 2nd. No matter what I change on the router I can't get it to stop sending it's own IP out ONLY as the IPv4 DNS server for DHCP.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6866
Location: Romerike, Norway

PostPosted: Tue Oct 16, 2018 20:10    Post subject: Reply with quote
You can port forward the request to the dns server.

iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to 192.168.11.250
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to 192.168.11.250
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum