Page 1 of 2
No (local?) DNS when connected to OpenVPN
Posted: Mon Mar 27, 2017 9:20 am
by maartenpelgrim
It seems my DNS server is not working when I make a connection via OpenVPN. Or at least, when connected to OpenVPN I cannot reach my Samba-shares, nor my router (
http://router) or my hda (
http://hda). I can, however, reach the rest of the internet, but this, I believe is due to the fact that I have set a second DNS server (when the main DNS cannot be reached for whatever reason) in my router/modem.
I literally have no idea what is causing this, so I have no clue as to what information to give you, other than that I am running the otherwise excellent Amahi 9, and using the openvpn client (network-manager-openvpn) on Linux Mint 18.1.
Help is much appreciated, and many thanks in advance!
MPE
Re: No (local?) DNS when connected to OpenVPN
Posted: Mon Mar 27, 2017 12:05 pm
by bigfoot65
I believe is due to the fact that I have set a second DNS server (when the main DNS cannot be reached for whatever reason) in my router/modem.
When using the HDA for DNS it's important you set both primary and alternative DNS servers to the HDA. Renew the DHCP lease on your client and verify. Then try and see if things are working correctly.
In my experience, having different DNS servers with the HDA causes issues. Sometimes the primary is used while other times it's the secondary.
Re: No (local?) DNS when connected to OpenVPN
Posted: Tue Mar 28, 2017 10:00 am
by maartenpelgrim
Et voila!
After also setting the secondary DNS to my local Amahi Static IP everything worked immediately, and without any hickups. Consider this one solved!
Re: No (local?) DNS when connected to OpenVPN
Posted: Wed Mar 29, 2017 2:01 am
by maartenpelgrim
It seems I have celebrated a little too early. Yesterday, I tested the VPN connection on my cell phone with mobile internet; that worked, and still is working.
Connecting, however, to the internet via another wifi spot, sadly, is not working. Any (new) ideas?
Re: No (local?) DNS when connected to OpenVPN
Posted: Wed Mar 29, 2017 5:08 am
by bigfoot65
Have you checked out the
OpenVPN Troubleshooting page?
There may be something there that might help.
Re: No (local?) DNS when connected to OpenVPN
Posted: Wed Mar 29, 2017 6:43 am
by maartenpelgrim
Yes I did, and helas, id does not solve my problem.
I do have some questions though.
In the server side config file i noticed a couple of lines, for example this one:
This is not my server adress, however.
Another one:
Code: Select all
push "route 192.168.178.0 255.255.255.0"
This is outside my DHCP range.
It is probably because I don't know anything about the settings; can you tell if these are correct?
Re: No (local?) DNS when connected to OpenVPN
Posted: Wed Mar 29, 2017 7:04 am
by bigfoot65
server 10.8.0.0 255.255.255.0
This should be the secure IP Address subnet used when using OpenVPN.
Should be correct. Is the wifi hotspot you are using assigning the same subnet as your home network? i.e. 192.168.1.x
Re: No (local?) DNS when connected to OpenVPN
Posted: Wed Mar 29, 2017 7:41 am
by maartenpelgrim
Is the wifi hotspot you are using assigning the same subnet as your home network? i.e. 192.168.1.x
No, for as far as I can tell. My home network is 192.168.178.x (not very common), which is not used at the places I connect to (public) wifi.
Meanwhile I've been fiddling around and trying to see if switching to the DNS in my router/modem would work, by switching off Amahi DNS, switching on the router DNS and setting the DNS in amahi.conf file to the modem/router ip-adress. Sadly, this didn't work either, so I have put all settings back to "status quo".
Re: No (local?) DNS when connected to OpenVPN
Posted: Wed Mar 29, 2017 7:55 am
by maartenpelgrim
something else to add:
I just did - connected to VPN - an nslookup on my local amahi domain and got the following reply:
Code: Select all
Server: 127.0.1.1
Address: 127.0.1.1#53
and
Code: Select all
server can't find [mydomain]: REFUSED
Shouldn't the server-ip be my local static amahi ip-adress?
Re: No (local?) DNS when connected to OpenVPN
Posted: Wed Mar 29, 2017 1:36 pm
by bigfoot65
Shouldn't the server-ip be my local static amahi ip-adress?
Yes that's a problem.
Can you access the HDA by IP address with a web browser?
Also check the HDA IP address from command line:
If the result does not show your IP address of the HDA, then there is something not right.
BTW, when installing did you follow the guidance precisely and not deviate? It's important if you did anything different that you state what it was.