Local DHCP/DNS changes not propagating

48 views
Skip to first unread message

Jackson Wearn

unread,
Mar 13, 2018, 1:36:23 PM3/13/18
to tunnelblick-discuss
I recently setup an OpenVPN server on my router (which uses Tomato firmware).  I have everything setup and I can connect remotely to my local network using Tunnelblick.  However, my local DNS changes do not seem to be propagated.

I run a web server on my local network, with the hostname "cerberus".  Inside my local network, I can navigate to "cerberus/" in google chrome and it will resolve to my web server.  However, when I connect remotely using Tunnelblick and my OpenVPN server, I get an "ERR_NAME_NOT_RESOLVED".

Interestingly, I can see that my DNS server is updated to 192.168.1.1 when connecting via Tunnelblick so I would think my local DNS changes would be present.

Also of note, my local DNS changes work perfectly when connecting to OpenVPN using the OpenVPN Connect App on my android smart phone.

set...@liquidchicken.org

unread,
Mar 13, 2018, 5:07:33 PM3/13/18
to tunnelblick-discuss
It sounds like you have an issue with "search domains", which is one part of your DNS configuration that typically changes depending on your location

When you navigate to "http://cerberus" in your web browser, you are using a DNS "short name".  Behind the scenes, your OS DNS resolver walks through your list of search domains appending each one to your short name (cerberus), then attempting a DNS lookup.  I'm guessing that your search domains are set correctly when you are on your local network, but are getting changed when you are remote.

I think you either need to change your OpenVPN config to include a push "dhcp-option DOMAIN mylocaldomain.com", or somehow modify your Tunnelblick config.  I googled a bit, but didn't find anything conclusive.  This looked relevant.


Jackson Wearn

unread,
Mar 13, 2018, 5:22:25 PM3/13/18
to tunnelblick-discuss
I think you are on to something there.  When connected directly to my local network, my DNS is pointed to 192.168.1.1 and has no search domains listed.  However, when I connect using my vpn, my DNS is pointed to 192.168.1.1 with a search domain named openvpn.  I'm going to do some research around search domains with OpenVPN as that seems to be a factor.

Thanks!

Jackson Wearn

unread,
Mar 14, 2018, 9:14:18 AM3/14/18
to tunnelblick-discuss
I was able to resolve my issue by adding "lan" as the custom domain for my router. Then in my server config I added the following:
push "dhcp-option DOMAIN lan"
Reply all
Reply to author
Forward
0 new messages