I user my laptop both in company and at home. At home I have implemented ownCloud installed on home server. On the same server is installed local DNS/DHCP (for internal needs of home LAN) based on dnsmasq.
The problem is, when I am at home and after established VPN connection to my company over OpenVPN.
The address of my home ownCloud server is blablabla.ddns.net. Of course when I am at work, World DNS system returns proper address of blablabla.ddns.net.
But when I am at home, dnsmasq returns me address of ownCloud server according to home LAN addressing.
But if I turn on VPN connection, my company server push me its own DNS server, with address 10.55.55.100. So my connection over LAN to my ownClud instance is broken, because company DNS server dont know of course about my internal home LAN addressing.
Of course using --up and --down options during establishing OpenVPN connection, it is possible to modify resolv.conf file. So I try it by simply adding address of my home DNS server. But it seams to look that if IP stack receive from the first DNS server info - no such address - it does not ask second one (that is my home internal DNS).
Is there any way to solve that problem?