No (local?) DNS when connected to OpenVPN

maartenpelgrim
Posts: 30
Joined: Mon Oct 12, 2015 2:44 am

No (local?) DNS when connected to OpenVPN

Postby maartenpelgrim » Mon Mar 27, 2017 9:20 am

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
Last edited by maartenpelgrim on Wed Mar 29, 2017 1:59 am, edited 2 times in total.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: No (local?) DNS when connected to OpenVPN

Postby bigfoot65 » Mon Mar 27, 2017 12:05 pm

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

maartenpelgrim
Posts: 30
Joined: Mon Oct 12, 2015 2:44 am

Re: No (local?) DNS when connected to OpenVPN

Postby maartenpelgrim » Tue Mar 28, 2017 10:00 am

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!

maartenpelgrim
Posts: 30
Joined: Mon Oct 12, 2015 2:44 am

Re: No (local?) DNS when connected to OpenVPN

Postby maartenpelgrim » Wed Mar 29, 2017 2:01 am

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?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: No (local?) DNS when connected to OpenVPN

Postby bigfoot65 » Wed Mar 29, 2017 5:08 am

Have you checked out the OpenVPN Troubleshooting page?

There may be something there that might help.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

maartenpelgrim
Posts: 30
Joined: Mon Oct 12, 2015 2:44 am

Re: No (local?) DNS when connected to OpenVPN

Postby maartenpelgrim » Wed Mar 29, 2017 6:43 am

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:

Code: Select all

server 10.8.0.0 255.255.255.0
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?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: No (local?) DNS when connected to OpenVPN

Postby bigfoot65 » Wed Mar 29, 2017 7:04 am

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
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

maartenpelgrim
Posts: 30
Joined: Mon Oct 12, 2015 2:44 am

Re: No (local?) DNS when connected to OpenVPN

Postby maartenpelgrim » Wed Mar 29, 2017 7:41 am

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".

maartenpelgrim
Posts: 30
Joined: Mon Oct 12, 2015 2:44 am

Re: No (local?) DNS when connected to OpenVPN

Postby maartenpelgrim » Wed Mar 29, 2017 7:55 am

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?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: No (local?) DNS when connected to OpenVPN

Postby bigfoot65 » Wed Mar 29, 2017 1:36 pm

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:

Code: Select all

ip address
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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 16 guests