I use a VPN on an interface, e.g tun0 (220.127.116.11/24), while the LAN network is on the interface eth0 (18.104.22.168/24).
I use dnsmasq to route specific addresses to my LAN and these addresses have their VPN network counterparts which should link to the same host name which resides on the same machine which is also the DNS. (The interfaces are firewalled so eth0 can't communicate with tun0 and viceversa)
So we would have two host file like these:
I'm finding some difficulties to tell dnsmasq to use a specific host file for a specific interface without launching dnsmasq two times in a way similar to:
dnsmasq -I lo -i eth0 -H hosts.eth0
and its counterpart
dnsmasq -I lo -i tun0 -H hosts.tun0
This approach isn't very nice on a Debian 8 box and I think there must be a better way to achieve what I want to do. What can I do?