Modify

Opened 2 years ago

#21571 new defect

dnsmasq split-horizon config with auth server

Reported by: erm67@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: dnsmasq auth Cc:

Description

I use openwrt chaos calmer on my small home router (and find it great
btw), and I use dnsmasq-full as an authoritative DNS for a
freedns.afraid.org subdomain I host on my home server. I'd like to
configure the dns in a way that the domain resolves to address x.x.x.x when queried over the external interface and to 192.168.1.y when queried over the internal one, this because if I access the home server from inside the lan using the external address x.x.x.x all traffic goes through the nat layer of the small router and will slow down a lot. The home server is running owncloud over a Gbit network so especially when up/downloading large files it is important to access it using the internal address 192.168.1.y.
dnsmasq has basic split-horizon capabilities defining an auth server on the external interface and using localise-queries to serve a different address for the internal interface:

auth-server=owncloud.local.lan,wan
host-record=owncloud.local.lan,x.x.x.x
auth-zone=owncloud.local.lanm,x.x.x.x/32
localise-queries
address=/owncloud.local.lan/192.168.1.y

Unfortunately this doesn't currently work, I reported it upstrean ad it was recognized as a defect and fixed by commit 3a3965ac21b1b759eab8799b6edb09195b671306, it will be relesed in dnsmasq 2.76.
The patch however, is very simple and works also on dnsmasq 2.73 shipped with chaos calmer. Since this might be useful to others it's maybe worth including the patch without waiting for 2.76 to hit openwrt.

Attachments (1)

120-non-auth-localize.patch (1.2 KB) - added by anonymous 2 years ago.
patch

Download all attachments as: .zip

Change History (1)

Changed 2 years ago by anonymous

patch

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.