Page 1 of 2
DNS doesn't work when connecting to HDA over VPN
Posted: Tue Dec 09, 2008 8:46 am
by tep47
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.
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Wed Dec 10, 2008 12:43 pm
by fk4rp6
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
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Thu Dec 11, 2008 4:31 am
by tep47
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.
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Fri Feb 20, 2009 9:48 am
by mciv
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.
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Fri Feb 20, 2009 5:31 pm
by cpg
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.
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Sat Feb 21, 2009 7:01 am
by mciv
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.
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Sat Feb 21, 2009 3:40 pm
by cpg
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.
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Sat Feb 21, 2009 11:04 pm
by mciv
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.
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Fri Mar 27, 2009 8:56 am
by mciv
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?
Re: DNS doesn't work when connecting to HDA over VPN
Posted: Fri Mar 27, 2009 9:04 am
by cpg
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.