onpc icon indicating copy to clipboard operation
onpc copied to clipboard

WiFi connection Required for VPN usage

Open mrlad opened this issue 6 years ago • 26 comments

I tried to test out the Friendly Name for you when I only had an LTE connection (was trying to connect via VPN). Looks like onpc insists on a WiFi connection even if the IP address is manually entered.

Requiring a WiFi connection makes sense unless a VPN is in use. Can you please permit manual entry and connection even if there is no WiFi connection?

mrlad avatar Feb 21 '19 22:02 mrlad

Hi @mrlad, actually, there are no any limitations if IP address is manually entered. I only have a technical check whether any network is connected and than abort the connection if not. If you enters the IP address is manually, which error message do you observe in onpc if connection can not be established? Do you see one of these messages:

  • Invalid device name or port
  • No connection to the network
  • No connection to Wi-Fi. Please input Onkyo device IP and port manually
  • Onkyo device not found
  • Onkyo device not responding

mkulesh avatar Feb 22 '19 09:02 mkulesh

* No connection to Wi-Fi. Please input Onkyo device IP and port manually

This is the error message I saw. I did input it manually and the IP address could be pinged.

mrlad avatar Feb 22 '19 11:02 mrlad

Hi @mrlad, "No connection to Wi-Fi. Please input Onkyo device IP and port manually" only appears if you use "Search" menu that only works in a local network; i.e if Wi-Fi is available. The "Connect" menu does not requires Wi-Fi. That exactly error message do you see if you enters IP address manually in the "Connect" dialog?

mkulesh avatar Feb 22 '19 11:02 mkulesh

Do you propose to allow "Search" dialog in LTE as well; i.e always perform broadcasting independent from network type (Wi-Fi or LTE), correct? I am not sure whether a broadcasting works for LTE...

mkulesh avatar Feb 22 '19 12:02 mkulesh

No, I'm not suggesting an LTE broadcast. I just want to ensure that if I manually enter an IP address, it should try to connect. You could add a sanity check when on LTE only to ensure that the IP address is a private network address (10.x.y.z or 172.x.y.z etc).

mrlad avatar Feb 22 '19 18:02 mrlad

Now if you're saying this should work, then there's a bug here because its not working for me.

mrlad avatar Feb 22 '19 18:02 mrlad

If this receiver is available via VPN, you also is able to open the receiver setup web-page in browser on your Android device. Does it work? If not, the routing to the receiver is broken. Could you please collect and send me a log file from onpc where you try to connect via VPN? Could you also install any terminal program to you phone and just try to ping your receiver IP address?

mkulesh avatar Feb 22 '19 20:02 mkulesh

Hi @mrlad, I am a little bit confused:

I did input it manually and the IP address could be pinged.

I just want to ensure that if I manually enter an IP address, it should try to connect. You could add a sanity check when on LTE only to ensure that the IP address is a private network address

Now if you're saying this should work, then there's a bug here because its not working for me.

Do you mean you are able to connect and control a remote receiver via VPN if you enter IP address manually and just propose to restrict the IP range in manual mode to private network addresses?

Or you are NOT able to connect the remove device via VPN if you enter IP address manually? In this case there is a bug and I need more information that error shows onpc and also the onpc logging in order to fix it.

mkulesh avatar Feb 23 '19 12:02 mkulesh

Or you are NOT able to connect the remove device via VPN if you enter IP address manually?

Correct. I was unable to connect.

mrlad avatar Feb 24 '19 03:02 mrlad

I'll have to capture the log the next time I'm LTE only

mrlad avatar Feb 24 '19 03:02 mrlad

Hi @mrlad, do you have any new observations for this issue?

mkulesh avatar Mar 07 '19 21:03 mkulesh

@mkulesh I sent you a log via email. Interesting observation. If I try to connect when on LTE but w/o VPN, I get the device is not responding toast message from Android. When VPN is active, I don't see it and the log would seem to indicate it that the device can be found. But no controls are available and there's nothing in the device tab.

mrlad avatar Mar 08 '19 12:03 mrlad

Hi @mrlad, I tuned toady the firewall on my home server and and now I am able to connect my receiver directly via 3G (without VPN). I found that the app was tried to download images like songs covers using URL provided by receiver (i.e. http://192.168.1.80/album_art.cgi ) that of course only works in a local network and may have negative effects 3G/LTE mode. This problem is now fixed and all app features (inclusive cover images) work for me if I directly connect the player via 3G network. I also tested direct connection via 4G (LTE) - all app features also work as expected.

mkulesh avatar Mar 10 '19 21:03 mkulesh

Hi @mrlad, I now preparing the release 1.0 and not sure whether this issue still be open?

mkulesh avatar Apr 09 '19 18:04 mkulesh

Its not working for me but I may not be on the latest build. What build should I be testing with?

mrlad avatar Apr 09 '19 22:04 mrlad

Hi @mrlad, It would be helpful if you could collect the logging from the actual nightly build generated today: https://github.com/mkulesh/onpc/raw/autobuild/autobuild/onpc-v1.1-debug.apk

I also implemented the second, more comfortable way that allows us to collect logging:

  • Open "Settings" dialog and activate the "Developer options" an the end of the settings list
  • Go back to the App. An application menu (three dots on the left of toolbar) appears
  • In the App, try to connect your device
  • After the error message appears, press the application menu button and select the menu "Latest logging"
  • Long press on the text and than press "Select All" from context menu
  • Copy this text in buffer ("Copy" from the context menu) and send it me per e-mail
  • Open "Settings" dialog again and DISABLE the "Developer options"

mkulesh avatar Apr 14 '19 10:04 mkulesh

Fixed as a part of https://github.com/mkulesh/onpc/issues/95

mkulesh avatar Nov 25 '19 21:11 mkulesh

Released in v1.6

mkulesh avatar Nov 30 '19 11:11 mkulesh

It allows me to enter the IP address now and says it connects, but none of the inputs are active and I can't control anything. No friendly names are reported. It doesn't appear to be connected.

mrlad avatar Dec 06 '19 22:12 mrlad

Hi @mrlad, in the last releases, I reworked the network handling completely. Is this issue still actual? Or it can be closed as resolved?

mkulesh avatar Oct 20 '20 18:10 mkulesh

Still not working for me. WiFi w/VPN works, LTE w/VPN doesn't.

Device shows as in standby when it isn't, volume status not right, friendly names not shown etc.

mrlad avatar Oct 21 '20 00:10 mrlad

Hi @mrlad unfortunately I have no ideas how to fix this problem. I received today a new issue https://github.com/mkulesh/onpc/issues/192 How do you think is this issue related to the problem that LTE w/VPN doesn't work?

mkulesh avatar Oct 21 '20 18:10 mkulesh

Maybe related, but I'm not sure. Since VPN works with WiFi, its not as simple as VPN breaks onpc.

mrlad avatar Oct 22 '20 16:10 mrlad

Hi @mkulesh

I'm using your app and had the same issue with the VPN access. I tracked it down to the problem that my VPN clients are located in a own IP address subnet range than the regular LAN/WLAN clients.

The Onkyo (tx-nr656) seems to discard requests from clients outside the subnet range, but a ping to the Onkyo was possible anyway!

To use the app I had to set up a postrouting NAT rule with iptables on the VPN server: iptables -t nat -A POSTROUTING -o $INTERFACE_LAN -s $IP_RANGE_VPN -d $IP_ONKYO/32 -m multiport -p tcp --dport 80,60128 -j MASQUERADE

Hope it helps, here everything is ok with VPN now.

regards

mathias-ch1903 avatar Feb 07 '22 11:02 mathias-ch1903

Hi @mathias-ch1903, thank you for information. I expanded wiki page https://github.com/mkulesh/onpc/wiki/Connection-problems with additional settings needed for VPN use based on your example. Could you please take a look on this page?

mkulesh avatar Feb 19 '22 10:02 mkulesh

Hi @mkulesh Looks good to me. It would be great if someone else with a different Onkyo model could double check it technically on a different setup. Thanks for the additions!

mathias-ch1903 avatar Mar 02 '22 02:03 mathias-ch1903