Video není dostupné.
Omlouváme se.
Access Your Home Network From ANYWHERE! - PiVPN Tutorial 2020!
Vložit
- čas přidán 14. 08. 2024
- Today we're going to be showing how to access your home computers, servers, etc from anywhere in the world! This can also be used to protect your personal data in places with public WiFi!
Links:
PiVPN Website: pivpn.dev
Raspberry Pi (Device): www.raspberryp...
Raspberry Pi 3 (Case): amzn.to/2BCYTmk
PuTTY: www.chiark.gre...
OpenVPN Client: openvpn.net/co...
FileZilla: filezilla-proj...
Setting up Dynamic DNS: • Configuring DDNS Setti...
Portforwarding Documentation Site: portforward.com/
PiVPN Github: github.com/piv...
*Make sure you change your Pi’s default password! People can try to access your Pi since it’s port forwarded.*
● I REPLY to COMMENTS! Be AWESOME and drop a LIKE!
Links for things mentioned in the video.
► SOCIAL MEDIA!
• Twitter - / shaneajm
• Snapchat: ShaneAJM
►Be sure to Follow my TWITCH for Gaming!
bit.ly/1WynGJw
► My Website: shaneajm.com
- Shane Alexander (ShaneAJM)
After several days of trying to figure how to setup a OpenVPN server to remote to my home network, your tutorial was by far the simplest and easiest!
That's great to hear! Happy I could help out :)
people do not even attemp to follow other guides, this is the best and definitive guide, thank you for making this video
Glad it helped! Thank you :)
Great walkthrough and tutorial! Your instructions were clear. Finally managed to get my PiVPN up and going after a year of numerous tries via various CZcams videos. Installations were successful but I never managed to connect to the VPN.
Thank you! I'm glad this video helped you :)
@@ShaneAJM What type Raspberry PI device are you using 2,4,8 GB?
Excellent and thorough tutorial. I followed your instructions and now have a PiVPN ! Thank you :-)
dogboy888k Thanks! Glad it worked out for you! :)
This vid helped out so much, definitely deserve a ton more subscribers if this is the kind of content you're providing. thanks!
Followup: I have an issue where I can connect + have internet/ssh access to my home network with pivpn+openvpn setup when i'm on my mobile hotspot, but couldn't when I'm using my friend's home wifi, while I can connect to the openvpn profile, I have no internet/ssh access to my home network. After some digging, it might be because of ip range conflict. I don't understand the gist of how this is the case, and how do I go about fixing it? If u could shed a light on how, that would be fantastic. thanks!
Sorry for the late reply! That does sound like an IP range conflict to me. Best fix that I know of is to change the subnet your home internet is on (i.e. go from 192.168.0.x to 192.168.3.x). It depends on your router but there should be an option to change it there!
Excellent video, hope your channel grows.
Thank you!
Great walk through. Not too fast and explains everything.
Glad it helped you! Thanks for watching :)
That meow at 11:02 LOL
so i can use network though my internet from my phone from anywhere even though i have no data or sim wifi?
can i use my mini desktop if i dont have rasberty pi
Hi Shane and thanks for the tutorial! I follow your instructions until before filezilla with no problems. But can't find my ovpn folder on pi. Maybe I forgot something... I will try again!
yv6eda Check the pi user folder or whatever user you picked to store the profiles during the install. Sometimes they can just end up in the / directory too so try to check there too!
I have a question, once I do this, will I be able to access my local network remotely?
For example I have transmission and jellyfin running on my network, once I connect to openVPN, if I type in : will I be able to access web interfaces?
Yes it should allow this. That is what I use it for :)
so once i have it connected how do I actually access the computers or files on my network? and your video is great bud keep it up!!
I get this error when installing raspbian on my pc : "Installation step failed: Install the system"
Hi , dumb question i guess, which os are you running on your raspberry pi? Failed to mention it at the beggining. The raspberry pi os, retropie, debian , other distribution? Thanks , Great Guide
So I have a 2nd home in europe and would like to access my US content like CZcams Tv or hulu. Ive tried normal VPNs like NordVpn but youtube tv remembers my home ip address and kicks me out after a couple of weeks or wants me to change my home location. So would this method in the video work and use my home ip address? Also if it does could I connect the vpn with my home ip to my router in europe so the entire network would be able to access US content?
Using this method should let you access US Netflix no problem as according to Hulu / CZcams you are accessing it as normal from your home. If your router supports VPN protocols/connections you could set up the router to have all devices use it.
Hello I have the similar requirement, could you please give me a confirmation about it ???
it's very urgent and important for me please help me.
@@devsunny10 it works great! You just need a fast internet connection. Everything has been working for me including YTTV, Hulu, hbo max
@@amdeus Hello thanks for the prompt reply but I still want to have a discussion with you about some doubts or some boundary line scenarios if you don't mind can I connect with you please?
Hi Shane, if I use this setup, would my connected devices appear to be on my home network when I'm not at home? Also, any reason not to use a Raspberry Pi 4 Model B?
I'm not Shane but I think I can help. Yes, your devices would appear just as if you were on your home network, because you technically are. Also- there's no reason a Pi 4B shouldn't work as far as I know. The Pi 4B may work even better.
@@jasonbinney2979 Thanks Jason!
Great video! After successful connection to vpn I failed to open any external website! ... any idea?
I’ve kind of ran into this before when testing. Are you unable to reach an external website when connected to it inside your network or does it happen when you connect on something like mobile data? If it is when you’re inside the network it could be an installation or IP issue, try a reinstall as that fixed it for me.
i resolved the issue by configuring firewall and ip routing table ... thanks
@@468theking could you explain what you changed? Seems like there are a lot of people that have trouble with this… I can reach other devices but only with IP, not the Hostname. External Websites also don’t work.
Would this work through my universities firewall?
Most likely not considering that you would need access to port forwarding. Look into ZeroTier, that might work better for you.
Is that SLEEP "The Sciences" your desktop background?? 😀
Can i put any port in the installation of pi vpn?
Thanks brotha, you earned a sub
Great walkthrough! Is it possible to do this with an unraid server instead of raspberrypi?
can you give connect a ethernet cable into the pi and into a pc to give it wired vpn connection?
I 'v internet connection from provider with private ip address . For my home. Is there any chance can be access from out of local area?
Thank you for such great content! I've been successful with using the PiVPN installer to raspberry pi. My issue comes after importing the .ovpn file into the client and connecting to the VPN. Not able to connect to it. Neither from my laptop or mobile. Thanks!
How to access my server privately with my own VPN setup since port fowarding is risky?
You could try something like ZeroTier. You don't need to forward any ports and you can still access services on your network but only devices that have ZeroTier installed. I use it with my friends as I host a Minecraft server internally and it works well.
@@ShaneAJM can you make a video for ZeroTier tutorial? I'd love to see. By the way, you and Biased Riot are pretty much underrated but actually both of you have great content.
Great video. Thanks for the play by play. I have just one issue now. I have a Pi NAS server on a different Rasp. Pi, when i try to access it with my vpn from outside my home network, I can't connect. Can you give me some advise?
Thank in advance.
It could be because the IP address is conflicting with the internal IP range of the place you’re accessing it from. For example, when I’m at my friends house their network is a 192.168.x.x range which is the same as mine so it tries to direct it to their internal instead of mine. You can try changing what IP range your router gives out for the NAS and see if that fixes it.
Which Raspberry Pi do you recommend for this? Thank you so much!
Any of them work but I would use a RPi 4 just because they have a 1GB ethernet port compared to the 100mbit port on the 3.
Hey. Thanks for the tutorial! Its works fine accessing the internet but I can't access any local stuff like my server or reaching my router when connected to the VPN. Any ideas why its like that? thanks!
If your subnet is the same as the local wifi you’re connected to (not your personal internet) it will try to route you to the local connection.
For example, my house and my friends both had 192.168.0.0/24 subnets so it wouldn’t let me access my servers. When I changed mine to 192.168.3.0/24 it worked flawlessly.
Hi Shane - I set up my Raspberry Pi B+ and am able to connect my phone (ping) to my home network using the PIVPN/Wireguard connection. I have shared my folders and printing on Windows 11 but I don't know how to access my windows files on my iphone. Is there another app I need to add to my iphone or is there a specific path that I should be using in my phone's chrome browser? Any help would be greatly appreciated.
Hey! You can use the Files app and choose “Connect to Server”. It should show up once you put the local IP in.
Hi shane, thanks for the tip, but still i could not win to do access on public network, Could you please assist me?
Hey Shane. If I do what you just did in this video, when I access my home network from another country, will I be using my home IP Address when I surf the internet?
Yes! It'll send the traffic through the Pi so websites will see your home internet.
@@ShaneAJM TYSM. I appreciate it
@@ShaneAJM Hey Shane, I have purchased the Raspberry Pi 3 Model B, I conmected it to my router. Whenever I try to connect to it using PuTTy, it says connection Refused, and some other times it says Connection Timed Out. Do you know how to fix that?
Hello.. nice tutorial thanks for that, do you know if is possible to set this up even on an Raspberry Pi 1 Model B+? I just need the minimum hardware to make it work.
It’s should work! You won’t get full speed but it should be enough for general browsing, etc.
If I set up a laptop in my office and had only files stored on there could I use this to have it act as de facto server? Would the laptop have to be on? I am a layman about this type of thing
Also would it be susceptible to hacking etc?
Thanks a lot mate perfect tutorial
Thank you, glad it worked for you!
Is it just Bash language? Please I need an answer for a school project, Thanks!
Does pivpn still exist? I can access their site on the link provided and the install of the package fails on the pi. Sadly looks like this wont work anymore, but a nice clear video thanks anyway
Awesome video, thank you =)
hi! i have a question... if i need to change my public IP, do i need to reinstall PIVPN? or there is another way to change it?
There might be a way to change the static IP the software looks for but i’m not 100% sure. I’m planning on doing an updated version of this video in the next week or two so if I find an option for this while working on it I’ll be sure to reply to you here :)
@@ShaneAJM excellent ! I'll be waiting for your video
@@ShaneAJM any update?
can i do this on my newifi 3 d2 router flash by openwrt..
I'm really starting from the beginning - so which raspberry pi should I purchase? I would assume that I should go with the latest version, but how much RAM is needed?
The 2GB model should be more than enough but if you want to run more things on it I’d get a 4GB.
can we do this without a RASBERRY PI
You can but the install is different. I would recommend something like Wireguard or if you want to use OpenVPN use this tutorial: www.digitalocean.com/community/tutorials/how-to-set-up-and-configure-an-openvpn-server-on-ubuntu-20-04
@@ShaneAJM oh k thnx
amazing video. Can you do this with Mac/OS as well?
Thanks! The PiVPN software will require a Raspberry Pi but you can connect to the VPN no problem via a Mac.
Can you use this to access your windows pc via remote desktop feature?
Yes as long as the PC allows remote desktop connections!
Great video. I created a NAS with OMV on my Raspberry Pi. I also got OpenVPN working. My question is, how can I get access to my NAS share via my OPVN outside of my home network? Thanks.
Great question! You should be able to access it by mapping a network drive to the IP that your NAS (OMV) uses. Just keep in mind that on other networks you might run into some IP range conflicts. For example, coffee shop wifi has a machine at the same IP so your computer tries to connect to that instead of your NAS.
Thanks for the tutorial! btw cool wallpaper how can I put it on mine?
It's a from a program on Steam called Wallpaper Engine. It's not free ($5 I think) but it's worth it in my opinion.
Great!
shane, is this rasp pi loaded with an sd card and an os already? i've never done it before but it seems rasp pi does not have onboard memory. if it already has an sd card, what os?
Awesome video Shane, really good presenter skills; clear to understand and comprehend. I dropped you a like and subscribe to your channel. Question for you...If I have a z-wave hub application installed on the Raspberry, will I be able to be away from home with my mobile phone, connect with the VPN with my phone and interact with the z-wave hub application. Like open the app and use it on my phone, I’m using the z-wave hub app for home automation controls. Its kinda like remote desktop only on a phone screen. Thanks
Thanks for like and sub! In theory this should work because the application is still internal so you could send commands as usual. I haven’t tested it as I just recently started playing with a Z-Wave hub but I’ve seen people do similar things with Home Assistant!
would it be possible to get 2 way authentication
Thanks to this I set up my pivpn. I am able to connect and ping other devices on the network but I can not access shared drives on the local computers.
Mhmm, I haven't tried using shared drives with this but I believe you'll have to map the network drive with the IP rather than name of computer. So instead of doing \\{PCNAME}\{FOLDER} you'll need to do \\{MACHINE IP}\{FOLDER}. If that doesn't work maybe try your public IP.
@@ShaneAJM yup, that worked. I just had to use the ip address.
Great Tut. Appreciate the effort.
Why do you need to use port forwarding? And can you delete the config files after you connect for the first time or do they need to stay saved where ever you saved then? (in this video, on the desktop)
When on the desktop/laptop you will need to keep the profiles in a safe spot because that is what OpenVPN will look for. Once you transfer to something like a mobile device as long as the file is saved on it you can delete it from your computer.
Desktop, must have!! Where/how did you get that desktop? it's awesome
Thanks! It’s from Wallpaper Engine. You can get the program on Steam for around $5.
Thanks for the video, I want to know how can we exchange files and acces to the server directory ?
It depends on how your home server is set up. If you're using something like a Windows Share (Samba) you can connect via the File Explorer in Windows or use a file manager app that supports SMB on Android/Linux.
I do have a question. My dad and I are trying to do this on our home network, so we can access a file server that we are using, which is in old Mac. Will this work as well? Also we’re just a little nervous about security on this, because we don’t want anyone else getting on the network except for ourselves and approved people. Will this be OK? I was the one who set up the file server on our network, and gave it an IP address. Also, instead of using the ports 1194 or 443, just to clarify, we can use any port we want, as long as we forward it on the router?
Hey! This should be okay for that, you can do any port as long as it isn't being used up by another service. I can't guarantee that it will be 100% secure as nothing is but considering that a key file is needed to connect that lowers the attack surface a lot. Just make sure you're keeping the Pi up to date and use strong passwords for everything.
i cant find open vpn file
Why do you chose UDP over TCP? Any specific reason? I'd have thought TCP would be more reliable?
TCP can cause a slow down because it has to validate that the packets have been sent/received so it waits. UDP will consistently send data and doesn't check to see if the host received it. Games commonly use UDP as when realtime connection is important it's better to have a constant stream of data. Due to the nature of a VPN, UDP is recommended but you can still use 443/TCP if the place you want to use the VPN at might block a standard VPN UDP port.
I'm a bit confused about the DDNS set-up for OpenVPN on my raspberry pi. I now have a domain that I purchased from Google Domains. So do I set up DDNS on my gateway router?
If you're renting your router from your ISP they sometimes block this option from being accessible. I have a static IP so I haven't personally dealt with setting up DDNS before but try out this article and see if it helps: www.noip.com/support/knowledgebase/how-to-configure-ddns-in-router/
@@ShaneAJM My son is away from college - he's a Math/Comp Sci major, so he'll likely figure it out when he's home next.
Great video! But what about for those of us who are behind a NAT from the ISP side?
Thanks! I’m not too sure of a solution for this but maybe something like ZeroTier would work instead of a VPN. Lawrence Systems has a good video explaining how it works :)
@@ShaneAJM unbelievable zero tier works perfectly! But the thing is it doesn’t route packets through your home server like the vpn it just allows you to interface with devices in a virtual lan from anywhere in the world! Which is exactly what i needed. Thank you very very much. I’m definitely subbing! 👌
Hey Shane. Following your tutorial now. You explain everything very well, and it looks like a great tutorial, so thank you! My the pi is in the middle of updating after a fresh install so that i can follow it.
I have VERY limited Linux knowledge but i was just wondering why you don't just give yourself [sudo] admin privileges from the start rather than putting "sudo" in front of some of the commands? Is there anything wrong with doing that?
You could give yourself the privileges and do it that way! I just did it that way so that if anyone ran into issues it hopefully wouldn't be because of a permission error (not having sudo access). Glad you like the tutorial, I hope it helped!
While I agree with shane about it being possible, I think it might be more secure for you to not give yourself the admin privileges like that. If you need to run things as root and dont want to add sudo every time then maybe try using "su" to become root while you need to do that
Hi Shane, this might be another noob question but i'll try my luck. Can I use PiVPN even if don't have a RaspberryPi at the moment? Can I virtualize it in my esxi? Thanks in advance!
I haven’t tried it but you should be able to. It might give a warning out because it isn’t on Raspberry Pi OS but you might be able to create a VM with it.
@@ShaneAJM did it inside a vm on esxi,failed. guess i'll try it on a mini pc this time and test. does this only requires 1 NIC?
subbed great video
Awesome thank you!
Hi, this is a great tutorial, really in depth and you explained everything really well.
Before I jump to buying a raspberry pi, I just wanted to check with you that this workflow would work with my specific problem. I have 2 bitcoin miners at my student house 80 miles away from my family home and when they go offline for any reason I have no way of remotely rebooting them. If I was in the student house i can normally access each miners GUI from a browser by just typing their IP addresses into the search bar when connected to the student house WiFi, from there there is an option to reboot them. Could I setup a raspberry pi with pivpn in the student house that's connected to the wifi router and then be able to access each of the miners GUI's from my family home as I would be able to do if I was connected to the student house wifi?
Any help would be much appreciated !
This should work as long as the machines support Wake-On-Lan. You can usually enable this in the BIOS or on the OS itself.
what else you can do apart from sharing files?
Share files, remotely access PC, etc. I primarily use it to access some self hosted applications I run like Nextcloud or Pterodactyl Panel :)
Hey i know i am late but Can i still Connect if my pc i do this on is turned off?
Hey! You cannot connect to your PC directly. However, if your PC supports Wake-on-LAN then you could VPN into the PI, send a magic packet from a WoL app and then connect once your PC is on.
@@ShaneAJM Thanks alot :)
@@ShaneAJM how to connect openvpn on android devices?
I know I'm late, but how would this work using a windows computer?
You wouldn't be able to install the PiVPN software on to a Windows computer unfortunately. I haven't personally tried this out but here's an article that might help you: pureinfotech.com/setup-vpn-server-windows-10/
awesome job
beautiful crack
Could you run this along with pi hole?
Yup! If you have PiHole installed before you start the setup it’ll ask now if you want to use PiHole for DNS so you get adblocking on the go!
Followed this to the letter and OpenVPN GUI just hangs trying to connect. So now what?
If the ports are forwarded and it is still doing it then I would recommend trying the install on the Pi again and see if it works, I did run into something similar a long time ago and that fixed it.
@@ShaneAJM I also tried this too. Would Windows firewall prevent it connecting? If so, do I just turn off firewall?
Why did you hide the port you were going to use ?
Just in case my public IP got leaked I didn't want people to know what port I had a VPN on. You can obviously just port scan and find it but I didn't wanna make it easier lol.
Where did you get your wallpaper?
It’s a wallpaper from Wallpaper Engine on Steam. It’s paid software but well worth it in my opinion.
Can you do with wireguard pc version please
Hey! I’m planning on creating an updated version on this video soon using the new Wireguard options so keep an eye out for it!
@@ShaneAJM is that out yet
How can I use for my Mac?
You can download the OpenVPN client for Mac and follow the same steps!
Hi thanks this tutorial is great, but I am unable to access my printer and other LAN devices at home when connected to the vpn. Any suggestions?
This could be because your device is seeing the Pi as the default gateway. You can check this on windows by connecting to the VPN and running ipconfig /all in cmd. If it says that your default gateway is the Pi's IP you will have to update the tables in your router. I'm not exactly sure on how to do that but hopefully this points you in the right direction.
@@ShaneAJM it turned out to be my printer it's wireless connectivity isn't working. tried the whole thing again I have access to all my devices thanks anyways lol😂