It's really great letting DNSMasq take care of DHCP / DNS, as it "just knows" everything... as it should, considering it dished out the addresses to the hosts...
However, it seems (to me) - impossible to separate the "routing logic" from the DHCP portion of the program for most SoHo routers..
For example -
- A location's router cannot run DNSMasq.
- The LAN is served by a single IP / connection with NAT routing handled by WAN gateway router...
Internal DNS and DNS forwarding is provided by an Internal host, possibly with ports 53 forwarded to it, etc.
I've been too sure it would't work to ever try, but can you hand off the DHCP addressing responsibilities to the internal DNSMasq server (on a private IP), while still allowing a dedicated hardware router to serve as the external gateway..?
It seems like the address allocation is inextricably connected to the address allocation process, but that just seems so primitive..... Would a router be able to figure out the port-mapping and create the routing tables, if it had not allocated the addresses itself, possibly ARPing the whole thing as it goes along, or something?
Here's a quicky: If you can change the starting options of the dnsmasq daemon it supports what you're asking for: for disabling internal DNS caching -p 0 will facilitate that setting the dhcp option 6 (DNS server) and option 3 for the outbound gateway.
I would suggest looking at DHCP3-server on a cheap box, but that's just me. If this is what you've got the below should do the trick.
dnsmasq -p 0 --dhcp-option = 6,[ipofdnsserver] --dhcp-option=3,[ipofgateway]
(fyi dnsmasq man page: http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html)