I am a noobie. Seem to have issues with anything I install on my raspberry pi 4b. First off I have my router using openDNS (is this a problem or make the set up different?). I set a static IP for my raspberry pi in the router so every time it sees the pi it gives it that IP (This has worked).

I installed the full raspbian desktop version. Then installed pivpn with

curl -L https://install.pivpn.io | bash

I choose wireguard because online it says it is super secure and better than openVPN. I did default settings and choose openDNS on the page when it asked about DNS (Does this automatically connect to the routers openDNS?). Default, default - client name pi, port 51820.

I then read something about having to port forward to the pi so I went into my router and set a UDP rule using port 51820 for the pi. I also saw port 80 and 22 having TCP to the pi, not sure if I set those up so I ignored them for now. (I do not know what TCP and UDP mean, I am a noob :(.

I installed the wireguard app on my iphone and scanned the qr code that was generated and switch on the vpn. Not sure what was suppose to happen at this point but my internet on my phone stopped working or maybe it became super slow (Not sure, Not sure how Vpn's actually work on a deeper level, I only have a surface understanding). I looked at the logs on the wireguard app and it was saying sending handshake and then saying handshake failed. I don't know what is failing at this point.

My plan for my raspberry pi is to set-up pihole (block adds), pivpn (wireguard, protect my privacy), connect my ssd (SATA 2.5" 480gb SSD)so the pi has plenty of storage, set a torrent and web server. Try to host my own websites and be able to watch my own movies on the go without having to use local storage.

From what I have read this is possible but the steps to integrate everything seem to always fail for me (I have been at this for 3 weeks trying different things, Just tired of always starting from scratch multiple times in a day reformating the sd card every time because uninstall scripts never seem to erase everything). At this point I need help and maybe a suggested book/article to read that might give me more knowledge so I can be a better troubleshooter when setting up technologies.

  • You can read this wireguard.com/protocol and all pages on wireguard website for a starting point – Make your tests in your Local network first before behind NAT. Use Network Analyser ...
    – Ephemeral
    Commented May 9, 2020 at 14:17

1 Answer 1


That's a big project what you try to implement. This sort of questions does not fit very well to the format of this Q&A. You should split it in different detailed single questions. But I will try to give some general ideas to your project.

You are looking for encapsulating scripts and helper programs in the hope they will simplify setup. This may be true if you just use this one helper application. But they are often not flexible enough or determine settings so interaction with other helper applications are very difficult. For example openDNS (I don't know that) and pihole fiddle both with DNS name resolution and nameserver, where pihole may block requests that openDNS wants. DNS requests should go direct to the internet to public nameserver, not using a VPN with pivpn/wireguard. You want to have a web server, of course using SSL encrypted HTTPS:// pages and you want to have a streaming server for you media on the 480gb SSD that should use an encrypted channel, maybe a vpn connection?

Another issue I see so far, is that you try to use a Virtual Private Network to connect a single device (your iPhone). But a VPN is made to merge two remote subnets over an unsecure medium (the internet) so connecting only one device with it is suboptimal and increases complexity. There are better solutions like ssh.

You see, even for an experienced network user this is a sophisticated project. You should have a general idea how to manage it. As far as I see you do not need a VPN, but SSH which is supported out of the box and known to be very flexible and configurable, so it should fit very well. Then I would do this step by step:

  • Protect your local area network, e.g. with pihole but not using additional DNS applications. As far as I know, pihole already provides a local caching only DNS server that should be able to manage standard DNS issues.
  • Setup a media streaming server so you can use it on your local network
  • Setup a webserver with SSL so you can use it on your local network
  • Define a Raspberry Pi as gateway server with a wired uplink to your internet router and enable its ssh-server as entry point from the internet.
  • Configure port forwarding on the internet router to the local ssh-server, web-server and streaming-server.

It may be possible that you need a VPN but cannot see it yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.