DNS doesn't work when connecting to HDA over VPN

tep47
Posts: 7
Joined: Mon Dec 08, 2008 2:19 pm

DNS doesn't work when connecting to HDA over VPN

Postby tep47 » Tue Dec 09, 2008 8:46 am

I'm running Ubuntu Linux 8.10 on my client, and can successfully create a VPN connection to my HDA. I can ssh into it, and ping it. However, when I try to ping it by it's name <hda.example.com>, I get an unknown host. I followed the instructions here to configure the OpenVPN client. It doesn't seem as if my hda is added as an additional name server. How do I go about doing this? I assume I need to modify the OpenVPN configuration file. Thanks.

fk4rp6
Posts: 6
Joined: Tue Dec 09, 2008 9:21 am

Re: DNS doesn't work when connecting to HDA over VPN

Postby fk4rp6 » Wed Dec 10, 2008 12:43 pm

Try checking your OpenVPN config on your HDA box and see if the statement push "dhcp-option DNS (HDA address)" is entered. Mine looks like push "dhcp-option DNS 192.168.109.5". The config file is located in /etc/openvpn/amahi.conf. After adding the statement you need to restart the VPN server with "service openvpn restart".

Hope that helps

tep47
Posts: 7
Joined: Mon Dec 08, 2008 2:19 pm

Re: DNS doesn't work when connecting to HDA over VPN

Postby tep47 » Thu Dec 11, 2008 4:31 am

The amahi.conf file is fine. I have the push "dhcp-option DNS ..." in there. I actually noticed that when I connect to the VPN, I see that statement come through. I did some searching on openvpn.net, and found this. It turns out those DHCP commands are just stored in an environment variable, foreign_option_{n}. I need to run an --up script which parses those options, and runs them.

So once I figure out how to run an --up script, I'll update this thread. The Amahi wiki page should be updated as well, as anyone who's running linux, and trying to connect to their VPN, will run into this same issue.

mciv
Posts: 70
Joined: Mon Feb 02, 2009 9:52 am
Location: Augusta, ME

Re: DNS doesn't work when connecting to HDA over VPN

Postby mciv » Fri Feb 20, 2009 9:48 am

Any change here?

I finally got the vpn working but can't access web apps like calendar, phpmyadmin, etc. Freenx connects and I can mount shared folders but using a web browser fails.

User avatar
cpg
Administrator
Posts: 2615
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: DNS doesn't work when connecting to HDA over VPN

Postby cpg » Fri Feb 20, 2009 5:31 pm

is it possible that the client computer has been "fixed" by corporate IT personnel or something where they put a static dns/domain configuration?

we see that occasionally with corporate laptops.

try with the full domain, like wiki.home.com
(assuming home.com is your home domain).

hope that works, otherwise we can try other more radical things, like dumping the state of the tcp settings and checking them out.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

mciv
Posts: 70
Joined: Mon Feb 02, 2009 9:52 am
Location: Augusta, ME

Re: DNS doesn't work when connecting to HDA over VPN

Postby mciv » Sat Feb 21, 2009 7:01 am

In my case I tried the whole domain plus the dyndns domain I have setup and the ip address. I was inside a windows domain but don't know much about how they have the network setup so it could be a "corporate" issue. I'll poke around some more next time I'm in the office.

User avatar
cpg
Administrator
Posts: 2615
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: DNS doesn't work when connecting to HDA over VPN

Postby cpg » Sat Feb 21, 2009 3:40 pm

just noticed this new VPN server message:

Code: Select all

openvpn[7906]: NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
if you are connecting from some other subnet that conflicts with your home network, it could also be the source of your issue.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

mciv
Posts: 70
Joined: Mon Feb 02, 2009 9:52 am
Location: Augusta, ME

Re: DNS doesn't work when connecting to HDA over VPN

Postby mciv » Sat Feb 21, 2009 11:04 pm

In my situation I work mostly from home so it was important to be able to connect to the corporate network from home which required changing my home IP range because there was a conflict. Once changed I could easily connect from home to work through the corporate VPN so the IP conflict should be resolved. The issue now is going the other way, from work to home.

mciv
Posts: 70
Joined: Mon Feb 02, 2009 9:52 am
Location: Augusta, ME

Re: DNS doesn't work when connecting to HDA over VPN

Postby mciv » Fri Mar 27, 2009 8:56 am

I've had a chance to look at this again and still no resolution but hopefully closer.

When I connect to the VPN using Windows everything works great. I can access all the webbased apps with no trouble.

When connecting through linux (Ubuntu 8.04) I still cannot access the web apps but I can access sharepoints. Not sure what to change to make dns work. Any ideas?

User avatar
cpg
Administrator
Posts: 2615
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: DNS doesn't work when connecting to HDA over VPN

Postby cpg » Fri Mar 27, 2009 9:04 am

i have not used ubuntu as a client myself, however, there would seem to be an issue of where to find the DNS at home.

you can always try with forcing the name server in /etc/resolv.conf by pointing to your amahi HDA at the other end of the vpn tunnel (though your regular IP should work, routing wise).

just change one line and try it.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Who is online

Users browsing this forum: No registered users and 3 guests