I have an OpenVPN server to the inside of my own network, and on that inside, I have a DNS server that handles local names. The OpenVPN server actually is on a small rented VPS, and my home’s router servers as an OpenVPN client. The OpenVPN servers uses client-to-client, and its addresses actually are 192.168.6.0/24, while the home route is 192.168.2.0/24 with 192.168.2.1 as the router and the local DNS server.
My GL-MIFI gives out 192.168.8.0/24 addresses and it also makes an OpenVPN connection to the VPS, which therefore serves nicely as a router between 192.168.2.0/24 in my home and 192.168.8.0 for anything connected to the GL-MIFI. This all works. BUT…
How do I make the devices connected to the GL-MIFI understand there is a name server on 192.168.2.1. I tried hard with all sorts of options on the GLMIFI dnsmasq pages, but it doesn’t do it. The devices connected to the GLMIFI are told that 192.168.8.1 is their gateway and DNS, but they can never resolve any of my internal names. /etc/resolv.conf on the GLMIFI is correct (192.168.2.1 and 184.108.40.206 as name servers), and if I ssh to the GLMIFI, I can resolve my internal names.
My workaround was to create an extra hosts file on the GLMIFI with my list of external names; but this means I have to maintain this list in two places, both on my home rounter 192.168.2.1 and on the GLMIFI.
My dnsmasq.conf file is:
but this only works with the addn-hosts.