Your Own FREE VPN with Raspberry PI, Wireguard, Docker Compose and DuckDNS using Port Forwarding.

Sdílet
Vložit
  • čas přidán 29. 12. 2023
  • In this video I will show you how to host your own private VPN that connects back to your home network from anywhere in the world. This tutorial is pretty simple to set up thanks to Docker and Docker Compose on the Raspberry Pi. This setup uses DuckDNS for a free SubDomain so the entire process is 100% Free (aside from equipment and ISP Bill).
    This is a great Raspberry PI 5 project!
    This type of VPN is not meant to be used for "anonymous" activities, as the IP will be that of your home network. This type of vpn is intended to allow you access to your self-hosted services like Jellyfin, Nextcloud, NAS, Media Server ...etc.
    Port Forwarding is not the most ideal setup, however it gets the job done.
    ONLY ALLOW PEOPLE YOU TRUST TO CONNECT TO YOUR HOME NETWORK!!!!!!!!
    If you found this helpful please support the channel by smacking that thicc like button!
    LInks:
    DuckDNS: www.duckdns.org
    DuckDNS Docker-Compose: docs.linuxserver.io/images/do...
    Wireguard Docker Compose: docs.linuxserver.io/images/do...
    If you would like to support the channel and buy me a coffee:
    buymeacoffee.com/codefallacy
  • Věda a technologie

Komentáře • 44

  • @6H111G9
    @6H111G9 Před 5 měsíci +3

    It seems like you just installed duck DNS in a directory named "wireguard" then you deleted that directory, then created it again to install the wireguard docker-compose.yml? Am I missing something?

    • @codefallacy
      @codefallacy  Před 5 měsíci +3

      i re-recorded this a video a few times and got brain fart. the duckdns container should have gone in its own "duckdns" directory at home. the last take i ended up putting everything in a wireguard directory. i caught my mistake too late and to keep the video short i edited it out. no harm in putting everything in the wireguard directory. but that is why i removed it

  • @feche8a
    @feche8a Před 4 měsíci

    I've seen a couple of your videos, it is really good to understand when you do a visual presentation of how things work, keep it up

  • @sims234ify
    @sims234ify Před 6 měsíci

    And another great video! Just subscribed :)

  • @Soulstar1983
    @Soulstar1983 Před 15 dny

    Thanks a lot, just bought a Raspberry Pi 5 and you helped me a lot setting everything up the right way! Thumbs up (y).

  • @EA-dz5yb
    @EA-dz5yb Před 2 měsíci

    Informative and to the point. thank you.

  • @BetterThanTV888
    @BetterThanTV888 Před měsícem

    your videos are solid and at the right level for beginners and those with some basic knowledge. kudos to your channel growth. 🎉

  • @charinasimeon9856
    @charinasimeon9856 Před 6 měsíci +1

    Great video 🎉

  • @rosmerygeronimo5972
    @rosmerygeronimo5972 Před 6 měsíci +2

    Keep it up!

  • @xrakion
    @xrakion Před 6 měsíci +1

    Nice!!!! Thanks

  • @user-wt9ge8rg7y
    @user-wt9ge8rg7y Před 6 měsíci +1

    Nice!!

  • @ydiadi_
    @ydiadi_ Před 5 měsíci

    superb video brother

  • @guysperanza7531
    @guysperanza7531 Před 6 měsíci

    gracias amigo

  • @achan7396
    @achan7396 Před 6 měsíci

    Very clear steps. Great instructor. I'm currently using tailscale and sometimes can't connect to my other local rpi. Is wireguard better in your opinion?

    • @codefallacy
      @codefallacy  Před 6 měsíci

      yes! i belive wireguard is better than tailscale. you arent using anyone else's server, just your own. if you dont want to do wireguard you could try cloudflare tunnels instead, it is similar to tailscale qnd doesnt require port forwarding but more secure

  • @matthewdigimon
    @matthewdigimon Před 3 měsíci

    great video, so happy to be using docker on my raspberry pi, one problem when I set this up I can connect to the VPN on my phone and I can access stuff on my LAN but I can't access the internet, any idea what could be happening? edit: after doing some more testing it doesn't seem to be able to make DNS requests

    • @codefallacy
      @codefallacy  Před 3 měsíci

      is your router properly port forwarding. if so check that the traffic type is UDP not not TCP. let me know if these help

  • @tsakeo
    @tsakeo Před měsícem

    Great videos ! I got "context deadline exceeded" error while pulling duckdns, any idea how to proceed ?

    • @codefallacy
      @codefallacy  Před měsícem

      hey, sorry for the delay. nhis appears to be docker specific. but it could be many things. to help diagnose, how long does it take when you run the docker compose up command? what device are you using to set this up? how fast is your internet speed?

  • @Armetron
    @Armetron Před 3 měsíci

    so, something I wanted to ask for clarification, when you did the speed test how much of an impact does the pi's hardware affect the speed?
    What's the speed difference between being connected locally vs using the vpn while still in the same location?

    • @codefallacy
      @codefallacy  Před 3 měsíci

      hey, it all depends on the network UPLOAD speed of the pi hosting the vpn. for the most part, if the connection is under 1gbps the pi hardware isnt the limiting factor but rather your upload speeds. i did a test while writing this comment on 4g network. without VPN i got 50mbps download a 10gbps download. once i activated the VPN i got 44mbps download and 9 upload. this is because my home network upload speed is now around 300mbps. i used to have gigabit speeds but im broke so i had to downgrade😂😂😂

    • @codefallacy
      @codefallacy  Před 3 měsíci

      following up on this, if i connect to my work network which is 500mbps i wouldnt be able to reach those speeds because my home network will only go up to 300mbps

  • @igncodmyt6412
    @igncodmyt6412 Před 3 měsíci

    Port forwarding on my router is really complex I’m enable to access internet over the vpn, I’ve successfully setup the entire WireGuard vpn without any errors the only thing left is port forwarding so if u can help me with that I’ll be really happy and go ahead do my projects, thank you

    • @codefallacy
      @codefallacy  Před 3 měsíci

      what router do you have and what os the internet company you have? give me as mamy details as possible to help determine what the issue is

  • @xxxsrixxx
    @xxxsrixxx Před 5 měsíci

    Excellent video, instead of opening the port can we use a reverse proxy like NginxProxyManager? Would it still work?

    • @codefallacy
      @codefallacy  Před 5 měsíci

      if you are paying for a VPS you can create a tunnel between the VPS and your raspberry pi woth wireguard or caddy without the need to port forward

    • @xxxsrixxx
      @xxxsrixxx Před 5 měsíci

      @@codefallacy I don't have a VPS, but i have a static public ip. so, instead of opening the port directly, can i use reverse proxy? Because I've used reverse proxy for http/https websites, never for this. Hence asking.

    • @codefallacy
      @codefallacy  Před 4 měsíci

      im not a network expert but i believe you could use a tunnel service like cloudflare tunnels or alternatives if you dont want to open any ports. i only have used nginx proxy manager iwith port forwarding but im hoing to be using wireguard tunnels through a vps moving forward

  • @jord9261
    @jord9261 Před 2 měsíci

    which ip did you put in the port forwarding? the pi's / pi hole's / or something completely different? I'm lost as to why my wireguard connects but my ip doesn't change so I'm clutching at straws here :/

    • @codefallacy
      @codefallacy  Před 2 měsíci +1

      the local ip address of the raspberry pi

    • @jord9261
      @jord9261 Před 2 měsíci

      @@codefallacy thanks!

  • @francescoprisco8198
    @francescoprisco8198 Před 4 měsíci

    I followed this tutorial perfectly, no errors. But when I connect to the iPhone's mobile network it lets me access the local network, while if I connect to WiFi nothing works.

    • @codefallacy
      @codefallacy  Před 4 měsíci

      this is weird. you should try to set pihole as the dns in the LAN i stead of WAN and see if that helps. let me know to further debug

  • @saravanandme83
    @saravanandme83 Před 3 měsíci

    Bro How can I extract it as a file instead of a QR code. For example to use in laptop, Gi inet routers.

    • @codefallacy
      @codefallacy  Před 3 měsíci +1

      the QR code is just one option. you can copy over the peer.conf file instead which has the interface information to import it into a pc or router.

  • @okaudi
    @okaudi Před 5 měsíci

    Sir, have you even encountered the issue like: "WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/arm/v8) and no specific platform was requested", My Raspberry Pi 4 is "aarch64" but when I pulled the image, it says "pi4# docker pull linuxserver/duckdns
    Using default tag: latest
    latest: Pulling from linuxserver/duckdns
    no matching manifest for linux/arm/v8 in the manifest list entries"
    When I pull with option --platform=linux/arm64, this images is downloaded, but can not run. because the warning above.
    I am really curious that we have the same device(Raspberry Pi 4), but in your video I have not seen any slice of these issues.

    • @codefallacy
      @codefallacy  Před 4 měsíci

      sorry for the late reply, that is weird🤔🤔🤔, is the operating system installed on the Pi 64 bits? i know the Pi 4 has a 64 bit processor but there is a 32bit version of Raspberry pi os that will run fine on it, vould you check?

  • @fronix3700
    @fronix3700 Před 5 dny

    Hi, I did everything in this video and I have one problem. When I use wireguard vpn I have no internet connection. Even when I set port forwarding or set dynamic dns on duckdns, I have a message that it is connected, but that didn't fix it, I don't know what I can do. Any tutorial can't solve this problem. I have a tp link Archer C80 router

    • @codefallacy
      @codefallacy  Před 5 dny

      Hey, im not too sure what the issue could be. Lets try a few debug steps. When connected to wireguard even though you dont have internet can you connect to local networks? For example, while connected to wireguard, are you able to access your routers login screen? Also double check to see if your router has a firewall enabled, if it does check that it isnt blocking wireguard

  • @Sartre_Existentialist
    @Sartre_Existentialist Před 5 měsíci

    What if you have a static IP?

    • @codefallacy
      @codefallacy  Před 5 měsíci

      if you have a static ip, you dont need to make the duckdns container. i would still do it jist in case, unless you are paying for a business connection, your ip may change after a few months

  • @987we3
    @987we3 Před 6 měsíci

    I think that tou don't have to make DuckDNS instead you just set this option to "auto" and wireguard will be checking public ip himself

    • @codefallacy
      @codefallacy  Před 6 měsíci

      Awesome, i didnt know thisn thank you for the feedback!