Access your OctoPrint remotely

Ok heres the output from those commands:

dansharpy@dan-lubuntu:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    50     0        0 tun0
default         _gateway        0.0.0.0         UG    600    0        0 wlp2s0
10.8.0.1        _gateway        255.255.255.255 UGH   50     0        0 tun0
_gateway        0.0.0.0         255.255.255.255 UH    50     0        0 tun0
kirstymanning.p _gateway        255.255.255.255 UGH   600    0        0 wlp2s0
192.168.1.0     _gateway        255.255.255.0   UG    50     0        0 tun0
192.168.43.0    0.0.0.0         255.255.255.0   U     600    0        0 wlp2s0
_gateway        0.0.0.0         255.255.255.255 UH    600    0        0 wlp2s0
dansharpy@dan-lubuntu:~$ traceroute 192.168.1.112
traceroute to 192.168.1.112 (192.168.1.112), 64 hops max
  1   *  *  * 
  2   *  *  * 
  3   *  *  * 
  4   *  *  * 
  5   *  *  * 
  6   *  *  * 
  7   *  *  * 
  8   *  *  * 
  9   *  *  * 
 10   *  *  * 
 11   *  *  * 
 12   *  *  * 
 13   *  *  * 
 14   *  *  * 
 15   *  *  * 
 16   *  *  * 
 17   *  *  * 
 18   *  *  * 
 19   *  *  * 
 20   *  *  * 
 21   *  *  * 
 22   *  *  * 
 23   *  *  * 
 24   *  *  * 
 25   *  *  * 
 26   *  *  * 
 27   *  *  * 
 28   *  *  * 
 29   *  *  * 
 30   *  *  * 
 31   *  *  * 
 32   *  *  * 
 33   *  *  * 
 34   *  *  * 
 35   *  *  * 
 36   *  *  * 
 37   *  *  * 
 38   *  *  * 
 39   *  *  * 
 40   *  *  * 
 41   *  *  * 
 42   *  *  * 
 43   *  *  * 
 44   *  *  * 
 45   *  *  * 
 46   *  *  * 
 47   *  *  * 
 48   *  *  * 
 49   *  *  * 
 50   *  *  * 
 51   *  *  * 
 52   *  *  * 
 53   *  *  * 
 54   *  *  * 
 55   *  *  * 
 56   *  *  * 
 57   *  *  * 
 58   *  *  * 
 59   *  *  * 
 60   *  *  * 
 61   *  *  * 
 62   *  *  * 
 63   *  *  * 
 64   *  *  * 

Does that mean its not getting through?

That is exactly what that means. I would have expected the packets to at least make it one or two hops. Try "traceroute 10.8.0.5" and "traceroute 10.8.0.1".

Another experiment to try is to take your laptop somewhere with free WiFi and try this experiment again. This would help determine if the android hotspot is the problem.

Can you describe your home network in a bit more detail (model numbers, modem type, switches, etc.)?

Dammit! I can see why people don't bother using a VPN now! I'm at work at the moment but I'll try it when I get home! As far as the network goes I've got the main modem/router (tplink archer vr900) connected to the phone socket (it's a fibre connection if that makes any difference) and then another router wired to that (tplink archer a7) which is in ap mode. That's it basically, no network switches or anything like that. Just some things plugged into the routers. I did try when connected to WiFi on my phone at my mum's house, it connected to the VPN but wouldn't load octoprint still.

Perhaps it's time to shift gears. From https://community.octoprint.org/t/a-guide-to-safe-remote-access-of-octoprint/3716/60:

There is now a plugin named Ngrok Tunnel in the plugin repository that creates a secure alternative to port forwarding that is easy to set up. It secures your communication with SSL (HTTPS) and Basic Authentication (username/password), and does not require you to open up your network in any way.

Yes I did see that but was hoping this would work as I also have a home assistant server I would of liked to access! Was hoping it was going to be a simple fix that was above my knowledge level but it seems a bit more complex than that so I'll give that plugin a go instead. Thank you so much for all your help and patience though, you're a credit to this community! Regards

I'm beginning to think it's one of the tp-link routers. Why two? Which one has the VPN? Which one is OctoPrint connected to?

So i found a thread (despite searching the same term ive done in the past and not seen it!) and apparently there might be a bug in tplink routers where the automatic routing doesnt work properly to route the vpn subnet to the main lan. Ive now set the vpn address pool to be on the same superset as the lan (so 192.168.3.0/255.255.255.240) and i seem to be getting a response on the traceroute command you asked me to do earlier! this is now the output:

dansharpy@dan-lubuntu:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    50     0        0 tun0
default         _gateway        0.0.0.0         UG    600    0        0 wlp2s0
kirstymanning.p _gateway        255.255.255.255 UGH   600    0        0 wlp2s0
192.168.1.0     _gateway        255.255.255.0   UG    50     0        0 tun0
192.168.3.1     _gateway        255.255.255.255 UGH   50     0        0 tun0
_gateway        0.0.0.0         255.255.255.255 UH    50     0        0 tun0
192.168.43.0    0.0.0.0         255.255.255.0   U     600    0        0 wlp2s0
_gateway        0.0.0.0         255.255.255.255 UH    600    0        0 wlp2s0
dansharpy@dan-lubuntu:~$ traceroute 192.168.1.112
traceroute to 192.168.1.112 (192.168.1.112), 64 hops max
  1   192.168.1.112  1283.825ms  124.599ms  68.287ms 
dansharpy@dan-lubuntu:~$ 

Whilst this looks a bit more promising i still cant connect to octoprint through a browser!
The article also mentions setting up a route between the lan and vpn subnets but im not sure how to do this. I found a setting called static routing in the router interface but dont really know what to put in!

In response to the above, i have alot of smart home wifi devices and the modem/router connected to the phone line couldnt deal with them allso i added the second to spread the load which solved the problem. The VPN is set up on the main modem/router which is the same one octoprint connects to.

Also just tried a different way, activating the vpn on the phone being used as a hotspot and then doing traceroute on the laptop and i get this response:

dansharpy@dan-lubuntu:~$ traceroute 192.168.1.112
traceroute to 192.168.1.112 (192.168.1.112), 64 hops max
  1   192.168.43.1  3.903ms  2.633ms  2.620ms 
  2   *  *  * 
  3   255.0.0.1  25.115ms  27.827ms  23.899ms 
  4   255.0.0.2  26.608ms  25.576ms  20.863ms 
  5   255.0.0.3  37.420ms  28.867ms  30.248ms 
  6   192.168.1.112  21.433ms  25.030ms  23.018ms 
  7   192.168.1.112  32.472ms  39.935ms  29.953ms 
  8   192.168.1.112  31.230ms  24.565ms  20.352ms 
  9   *  *  * 
 10   *  *  * 
 11   *  *  * 
 12   *  *  * 
 13   *  *  * 

Dont know if that helps or not!

The traceroute is reaching 192.168.1.112 so it should be working!

It would have been better if you had said "I found this thread, (URL added here)."

The VPN address pool on the "main router" tp-link doesn't need to be 255.255.255.240, 255.255.255.0 should be fine.

After reading this thread, I want you to try another change. On the tp-link router, change the service type to TCP. You will have to export the configuration again and put it on your android phone.

What app are you using on your android phone?

1 Like

Oh my god it worked!!! I changed the protocol to TCP, and used the other android app mentioned on the thread you linked and it connecting fine on my android phone and I can access octoprint! Also just tried on my laptop (with new config file) whilst connected to android hotspot and that works too!! Seems UDP was the problem then. Thank you so much for all your help and patience b-morgan, as I said before you're a credit to the community!

I'm not sure what I'm seeing but you'd think that your /28 mask would be seen in the routing table if it were correctly configured.

Hello guys,

is there some sort of guide how to access Octoprint remotely from phone when outside?

Thanks

I know this topic is getting pretty large (and therefore should probably be locked) but if you read it from the beginning you would have seen in the 10th post, https://octoprint.org/blog/2018/09/03/safe-remote-access/.

If this guide doesn't provide the answer you are seeking, please open a new Get Help ticket filling in the template, ask a specific question, and add any links to sections of the guide or specific posts in this thread that might be relevant.