Cannot get OpenVPN working

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Cannot get OpenVPN working

Postby luco » Tue Dec 13, 2016 7:42 pm

Or should I be safe if I do the following?
1. Change my router's gateway to 192.168.0.x to match my HDA profile.
2. Change my gateway settings in HDA and confirm I can access my shares and DHCP/DNS from Amahi is working for my home network clients.
3. Remove all apps from my Amahi 8 installation and reboot the server.
I would try this route first before doing a new intall.

Then follow the http://docs.amahi.org guidance for Upgrading Amahi 8 to Amahi 9. It works fairly well and would save you time.

The HDA OS Migration Guide is more for those who cannot do an upgrade.
Thank you! And wow! I am very impressed how easy it was to upgrade to Amahi 9! I'm running it now.
I managed to install OpenVPN again and then install HDAConnect on one of my Windows 10 laptops and connected it to my phone's hotspot and bam, it connected successfully!! That's with all the default settings and keeping UDP port forwarding rather than TCP I described in my first post.
Thank you very much!

Now, the only issue I have is how can I browse to my dashboard or share while connected via VPN to my server?
I assume that I have to use my full domain name. Is my domain the the one listed in the Control Panel on Amahi.org as "Home Domain"? So, if the control panel says "mydomain.net", to access my dashboard I should use http://hda.mydomain.net?
I tried that and it does not work.

I also tried to use "\\hda" as well as "\\hda.mydomain.net" to access my shares in Windows Explorer without success. :(

What am I missing?

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

Re: Cannot get OpenVPN working

Postby bigfoot65 » Tue Dec 13, 2016 7:56 pm

Thank you! And wow! I am very impressed how easy it was to upgrade to Amahi 9! I'm running it now.
Glad the upgrade was smooth and VPN is now working for you.
Now, the only issue I have is how can I browse to my dashboard or share while connected via VPN to my server?
Try http://hda/ and \\hda for shares.

Using VPN you should be able to access the HDA as if you were at home.
ßîgƒσστ65
Applications Manager

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

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Cannot get OpenVPN working

Postby luco » Tue Dec 13, 2016 8:08 pm

Thank you! And wow! I am very impressed how easy it was to upgrade to Amahi 9! I'm running it now.
Glad the upgrade was smooth and VPN is now working for you.
Now, the only issue I have is how can I browse to my dashboard or share while connected via VPN to my server?
Try http://hda/ and \\hda for shares.

Using VPN you should be able to access the HDA as if you were at home.
Unfortunately, that does not work.
Using http://hda/ in the browsers just redirects me to www.hda.com and using \\hda in Windows Explorer just results in a network error "Windows cannot access \\ hda".

I have successfully browsed my dashboard and shares on this very laptop without VPN. Ironically, the dashboard URL still comes up in the list in the browser address box.

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Cannot get OpenVPN working

Postby luco » Tue Dec 13, 2016 8:14 pm

I have just checked ipconfig on the Win10 laptop and can see that the hotspot gave it 192.168.43.x as its IP and subnet is 255.255.255.0. The gateway is 192.168.43.1.
The VPN IP is 10.8.x.x with 255.255.255.252 subnet.
My home local network is 192.168.0.x with 255.255.255.0 subnet.

Is that OK?

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

Re: Cannot get OpenVPN working

Postby bigfoot65 » Wed Dec 14, 2016 6:44 am

Should be fine.

Are you trying to use VPN from outside your network?

Also might want to clear your browser cache before trying the dashboard URL.
ßîgƒσστ65
Applications Manager

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

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Cannot get OpenVPN working

Postby luco » Wed Dec 14, 2016 7:06 am

Should be fine.

Are you trying to use VPN from outside your network?

Also might want to clear your browser cache before trying the dashboard URL.
Yes, I'm definitely accessing from outside my network. I'm using my cell phone as a hotspot and I'm using my cell provider's network. I confirmed the phone has 25.x.x.x IP while my home network's ISP uses 147.x.x.x.
So, I'm turning on the hotspot on my phone, then I'm connecting to the hotspot with my laptop. Then I launch HDAConnect, which successfully connects to my OpenVPN server. Its icon turns green and it shows an IP of 10.8.x.x

I can browse the web on this laptop without problems while connected to VPN. My public IP in the browser shows as 142.x.x.x.

I cleared cache, restarted browser and still cannot get to the dashboard.

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

Re: Cannot get OpenVPN working

Postby bigfoot65 » Wed Dec 14, 2016 7:20 am

I don't have any idea what could be preventing access to the Dashboard.

At this point, request you submit a bug report. Provide details and the link to this thread as well.

Maybe our developer can help.
ßîgƒσστ65
Applications Manager

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

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Cannot get OpenVPN working

Postby luco » Wed Dec 14, 2016 7:53 am

I don't have any idea what could be preventing access to the Dashboard.

At this point, request you submit a bug report. Provide details and the link to this thread as well.

Maybe our developer can help.
I just noticed that both the wifi and the TAP network adapter on the laptop had static DNS IPs. I changed both to "obtain automatically...", restarted the laptop, but I'm still getting the same result. And just to confirm, Amahi is my DHCP and DNS server on my home network.

Also, I'm not getting any errors in my HDAConnect log when it connects.

I wanted to give some family members access to my files this week and was hoping to remote in myself. :(

OK, I'll submit a bug report. Thank you.

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Cannot get OpenVPN working

Postby luco » Wed Dec 14, 2016 10:56 am

And it is SOLVED! :)

After not having success on my Win10 laptop, I thought that perhaps it's something to do with that Windows client. So, I went to configure OpenVPN on my Android phone. Downloaded the official OpenVPN client, which asked for profile file. So, I followed this wiki to create one: OpenVPN Config.
I loaded that custom ovpn file to my phone, copied over the required certificate and key files and boom, I was able to connect and browse to my dashboard on my phone using http://hda/
So, it got me thinking what is different about that configuration and the one used by HDAConnect. I compared the two config files.
I noticed that the two sections that needed to be customized in the out-of-box OpenVPN config file, do not exist in the HDAConnect file:

Code: Select all

remote YOURIPHERE 1194 #This needs to be changed per your external IP address route 192.168.1.0 255.255.255.0 vpn_gateway 3 #Use your network IP address, usually a router is at default 192.168.1.1
Now, I know that HDAConnect is picking up the remote IP as *.yourhda.com is entered into the dialog box that pops up. So, I only inserted the second line into my HDAConnect config file, saved, reconnected and now all is working well. I can browse my shares from Windows and I can log into the dashboard using my home domain!

This makes sense as, essentially, I could do everything, but my VPN client did not understand the domain name shortcuts. So, the VPN connection wasn't hitting the correct DNS gateway on the HDA to translate my domain names.

Hope this helps others. Not sure if this means that the HDAConnect client or the wiki needs to be updated as I'm using standard configurations everywhere. It appears that HDAConnect had a pre-configured gateway and only with the "route" in the config file could I force it to the correct one for my network.

I'm off to play with my HDA now! :D

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Cannot get OpenVPN working

Postby luco » Wed Dec 14, 2016 7:23 pm

Well, I spoke too son it seems. Still can't get to my shares or dashboard on this laptop. It works fine on my other Win10 client and on my Android phone with that custom config I mentioned above, but not on this Win10 laptop for some reason. :(

I'll get some friends to test this external access with HDAConnect over the next few days and see what I get.

Who is online

Users browsing this forum: No registered users and 17 guests