I am using DNSmasq both for my local clients and some inteet services. One service I provide is a dynDNS server. It receives IP updates via HTTP and writes it as simple hosts file but without domain. The domain is attached by DNSmasq due to the following minimal config:
interface=eth0 # inteal
interface=eth1 # exteal
no-dhcp-interface=eth1
dhcp-range=192.168.1.2,192.168.1.254,12h
domain=mydomain.eu
no-hosts
addn-hosts=/etc/hosts.dyndns # hosts file created by my dynDNS server
expand-hosts
# Server/VMs
host-record=server,192.168.1.1
host-record=server.mydomain.eu,<extealIP>
cname=dns.mydomain.eu,server.mydomain.eu
address=/mydomain.eu/<extealIP> # wildcard subdomains
The problem is: The domain is delivered by DHCP to my local clients, too. If some of it asks for server the client extends its request to the domain server.mydomain.eu which is answered by DNSmasq to be <extealIP>. Due to the topology of my coection to the inteet that involves several issues. Instead it should be resolved to 192.168.1.1.
How to make DNSmasq to distinguish between requests from local network and inteet? Or is it possible to use domain just for expanding hosts files?
- - , .
برچسب:
نویسنده: استخدام کار