No internet connection
  1. Home
  2. General

VPN

By Rob @Rob
    2021-02-25 17:51:42.054Z2021-02-25 22:23:03.376Z

    Hi there, awesome product and software - THANK YOU!

    Question: Is there any guidance on how to set up a VPN?

    Use case: I'm looking to have my virtual assistant interact directly with my computer and would need some way for them to access it outside of my local network.

    Background: I've read some of the related articles / responses. Below is the one I found most helpful, but I'm very unfamiliar with the technicalities of it all. I'm uncertain if I'm Installing these programs to the source computer (server) or directly onto the TinyPilot

    You can set it up for Internet access, but I haven't optimized for that yet. You'd need to use a solution like Tailscale, ngrok, or remote.it, which some of my customers do. The wrinkle is that the video stream is pretty bandwidth-intensive now, so you need a fast link. I'm planning to cut down on bandwidth early this year.

    Thank you for any help in advance!

    • 13 replies
    1. Thanks for checking it out!

      You would set up the VPN service on the Pi itself. The most popular VPN service among TinyPilot customers is ZeroTier. I haven't played around with it personally, but this looks like a pretty good tutorial:

      I'm also partnering with a YouTuber to make a video tutorial on setting up WireGuard as a VPN solution on your TinyPilot. I expect that to come out next week. WireGuard is one of the more advanced solutions, though, so it might not be the best fit.

      1. SKyle Sampson @sampson2269
          2021-12-24 13:36:17.083Z

          Hi, I was curious if you could steer me to the youtube video you are referring to here for wireguard.
          Thanks

          1. We unfortunately ended up scrapping the video, as it wasn't the quality I hoped for.

            I created a tutorial showing how to set up remote.it. I personally prefer Tailscale, as it's the most performant and not too hard to set up.

            1. LLee @lee
                2021-12-31 05:41:01.703Z

                i installed zerotier on the tinypilot and i am able to ssh into it but i cant access the website any idea's? im using the ip of the zerotier
                ive also tryed remote.it...remote.it seems even worse
                if i move it into the same lan as the computer it works
                btw i am trying to use a cellular connection been trying with AT&T and T-mobile

                1. Hmm, that's strange. If you can access the TinyPilot over ZeroTier, you should be able to hit all ports. I'm not familiar with ZeroTier. Do they restrict which ports you can access? TinyPilot requires port 443 to be accessible for you to access the web interface.

                  Does it work if you forward the port over SSH?

                  You can try this:

                  TP_HOST=tinypilot # replace with the hostname you're using through ZeroTier
                  
                  ssh "pilot@${TP_HOST}" -L 443:localhost:443
                  

                  That will forward your local 443 address to the TinyPilot over SSH, so you can then access the page through:

                  https://localhost/

                  1. LLee @lee
                      2021-12-31 18:19:40.977Z

                      the command failed
                      as far as i know there are no ports blocked on zerotier
                      is there a way to change port 80 and 443 to another port to test?

                      did you want me to do the command in tinypilot's ssh?
                      im using putty to ssh in

                      pilot@tinypilot:~ $ TP_HOST=10.147.18.18
                      pilot@tinypilot:~ $
                      pilot@tinypilot:~ $ ssh "pilot@${TP_HOST}" -L 443:localhost:443
                      ssh: connect to host 10.147.18.18 port 22: Connection refused
                      pilot@tinypilot:~ $

                      1. Sorry, to clarify, you'd enter that ssh command to connect to your TinyPilot initially. In the example above, you're already connected to your TinyPilot through ZeroTier, so connecting again doesn't work.

                        If you're creating the initial SSH connection through PuTTY, you should be able to use PuTTY's options to add port forwarding for port 443:

                        https://phoenixnap.com/kb/ssh-port-forwarding#ftoc-heading-3

                        1. LLee @lee
                            2022-01-03 04:40:27.358Z

                            still failed
                            i looked at puttys log's and it said it was forwarding it
                            i also tryed port 80 just in case
                            i think im gonna try and reimage it again even tho i dont think that is needed but just in case

                            1. Michael Lynch @michael2022-01-03 21:56:26.626Z2022-01-06 22:05:34.657Z

                              I don't think reimaging will help. It sounds like a networking issue where something in the path is allowing access to port 22 but not allowing 443. Is there a firewall in the mix someplace that's blocking access to specific ports?

                              Can you try SSHing into TinyPilot and running this command?

                              pushd $(mktemp -d) && python3 -m http.server 1234
                              

                              And then from your client machine, open this URL in your browser:

                              If you can access that URL, then there's some problem that's specific to TinyPilot. If you can't access that URL, then there's a problem with the ZeroTier configuration.

                              1. LLee @lee
                                  2022-01-05 17:26:40.333Z

                                  there shouldnt be any firewalls enabled ive disabled them
                                  ive tryed a windows 7 computer and a windows 10 same thing happens

                                  so when i run the command pushd
                                  and connect with browser i get

                                  This site can’t provide a secure connection

                                  at the same time when i look over at putty
                                  i get

                                  pushd $(mktemp -d) && python3 -m http.server 1234
                                  /tmp/tmp.5xW4PAIMKe /tmp/tmp.xFnjYpOMAX ~
                                  Serving HTTP on 0.0.0.0 port 1234 (http://0.0.0.0:1234/) ...
                                  10.147.18.237 - - [05/Jan/2022 17:18:11] code 400, message Bad request version ('ªª\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x01\x93êê\x00\x00\x00\x17\x00\x00ÿ\x01\x00\x01\x00\x00')
                                  10.147.18.237 - - [05/Jan/2022 17:18:11] "ü|þ�à~ÉP+º��,¼fÐ:%~ä¥�S�/,Ìæt î�áµlâMûs�BZ?b�ä·ËíVn¨Î ªªÀ+À/À,À0̨̩ÀÀ��/5�êêÿ" 400 - 10.147.18.237 - - [05/Jan/2022 17:18:11] code 400, message Bad request version ('ésºr¤+p"u') 10.147.18.237 - - [05/Jan/2022 17:18:11] "üi�1�cAá¡&ô�Ë!�±½t£z¬!sTMJôyMƹq °°Q.;f¶SPésºr¤+p"u" 400 - 10.147.18.237 - - [05/Jan/2022 17:18:11] code 400, message Bad request version ('ÊÊ\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x01\x93\x9a\x9a\x00\x00\x00\x17\x00\x00ÿ\x01\x00\x01\x00\x00') 10.147.18.237 - - [05/Jan/2022 17:18:11] "üP*j§�Mômí3¬�rÓ¨kË�¨
                                  §ÉuÂO6Ø/`` ½�i�?þ¨Ê¨�
                                  O�ñ�=J▒&{�ÎR_��Yd ÊÊÀ+À/À,À0̨̩ÀÀ��/5���ÿ" 400 -
                                  10.147.18.237 - - [05/Jan/2022 17:18:11] code 400, message Bad request version ('zz\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x01\x93ÊÊ\x00\x00\x00\x17\x00\x00ÿ\x01\x00\x01\x00\x00')
                                  10.147.18.237 - - [05/Jan/2022 17:18:11] "ürþß=6¾Ñô£ðq �¿IBÚO!Ô×q×´.n¶Ì�C ·ÌÿÁGöÀ�ìA"Æ_+ÐxÔÿDñÆ5D=Ps«=§· zzÀ+À/À,À0̨̩ÀÀ��/5�ÊÊÿ" 400 -

                                  1. Sorry, that should have actually been http://10.147.18.18:1234 not HTTPS, but it still tells me that ZeroTier isn't blocking every port because you were able to connect to port 1234.

                                    I'm not sure why you can't hit the TinyPilot server on 443. Are you certain it's running? Can you share the output of this command?

                                    netstat -lt
                                    

                                    Because if it's listening, I can't think of any reason why you can hit ports 22 and 1234 but you can't hit 443.

                2. A
                  In reply toRob:
                  @Alt0
                    2022-01-02 00:10:47.081Z

                    If it would be of interest, SoftEther ( https://www.softether.org/5-download ) is a great VPN to connect to your home network from say a smart phone, and I can share my setup and notes if its of help.
                    I have it such that SoftEther and Jump Desktop is configured on a small little headless server at home, and thus can mobley interact with my TinyPilot machine.

                    1. C
                      In reply toRob:
                      Gene Montgomery @Cthulhu7747
                        2022-01-11 02:05:00.438Z

                        Video for setting up TinyPilot with Tailscale: https://www.youtube.com/watch?v=hG4qoD53LVE