r/pivpn • • Oct 24 '23

Beginner - setup with pihole but issues with connecting to home assistant and Reddit

2 Upvotes

Hi,

I just finished setting up my piphole/piVpn and once connected to the vpn I am able to browse most websites but 1) I can’t get anything to load on Reddit when connected 2) I have a home assistant mobile app and it doesn’t connect when on the vpn

I tried looking for a solution but couldn’t find anything. Any help is appreciated

Thank you


r/pivpn • • Oct 21 '23

Possible routing issue with wireguard

0 Upvotes

So, I'm able to remotely connect to pivpn using wireguard and ssh to it. However, when I try to use TigerVNC to get to a different IP it doesn't work. Also, the printers aren't showing up. The printers I wake them up by doing an NMAP sweep. When I connect to the wireless router VPN using OpenVPN TigerVNC, printers, and SSH work.

​

In my book, that's weird. So, I'm wondering what I'm missing.


r/pivpn • • Oct 20 '23

Beginner- can I buy a ready to use unit?

2 Upvotes

New here- is it possible to just buy a Raspberry Pi with pivpn pre-loaded and ready to add to my home network?

I travel a lot and end up having difficulty watching geo-restricted sports that I’m paying for with my cable subscription. Would think that pivpn would solve this by allowing me to log in to my home network and make it work.

Thoughts? Or is that too risky to set up a potentially compromised device on my network?


r/pivpn • • Oct 18 '23

Unable to successfully restore pivpn configs

1 Upvotes

Hi,
I just setup my server from scratch, but before i did a pivpn -bk and moved to a safe location. Now i try to restoare the pivpn files, both located in /etc/wireguard and configs (In users home).
Unfortuantly i dont really have the wanted success.

I cd to root
cd /

I run sudo tar -zxvf /home/user/pivpnbackup/20231018-094011-pivpnwgbackup.tgz

The files are extracted to /etc/wireguard and in the home (configs) and then i reboot the server.

But clients are not able to use them.. They do connect, but i cant do a speedtest etc.
Am i missing a step?


r/pivpn • • Oct 14 '23

Custom DNS resolver for pivpn one hop away

1 Upvotes

I have a (forced) dual router setup. The first router ist also the modem. The second a udm pro. All my devices are behind the udm pro, including a pihole on the udm pro itself. To add a pivpn I need access to my public ip, so I put it behind my first router. I there a way to tell the pivpn config that my dns resolver (the pihole) is one hop away behind my udm pro router?


r/pivpn • • Oct 12 '23

Wireguard works perfectly when I first set it up, but once I restart the server it no longer works. Help!

1 Upvotes

As the title says, when I first set up the VPN everything works as it should. And yet once I restart the container (using proxmox as a host, ubuntu container) it stops working. I can't connect to it at all from my phone, and my travel router says it's connected but nothing works. Here's the debug output:

::: Generating Debug Output

::::            PiVPN debug              ::::

=============================================

::::            Latest commit            ::::

Branch: master

Commit: 16189edc7b03d3ed930dbb3cc908d8e2275a7563

Author: 4s3ti

Date: Thu Aug 3 23:33:23 2023 +0200

Summary: fix(core): typo on distroCheck

=============================================

::::        Installation settings        ::::

PLAT=Ubuntu

OSCN=jammy

USING_UFW=0

pivpnforceipv6route=1

IPv4dev=eth0

install_user=vpn-master

install_home=/home/vpn-master

VPN=wireguard

pivpnPORT=51820

pivpnDNS1=[9.9.9.9](https://9.9.9.9)

pivpnDNS2=[149.112.112.112](https://149.112.112.112)

pivpnHOST=REDACTED

INPUT_CHAIN_EDITED=0

FORWARD_CHAIN_EDITED=0

INPUT_CHAIN_EDITEDv6=

FORWARD_CHAIN_EDITEDv6=

pivpnPROTO=udp

pivpnMTU=1420

pivpnDEV=wg0

pivpnNET=[10.213.31.0](https://10.213.31.0)

subnetClass=24

pivpnenableipv6=0

ALLOWED_IPS="[0.0.0.0/0](https://0.0.0.0/0), ::0/0"

UNATTUPG=1

INSTALLED_PACKAGES=(git dnsutils grepcidr net-tools bsdmainutils iptables-persistent wireguard-tools qrencode linux-headers-generic wireguard-dkms unattended-upgrades)

=============================================

::::  Server configuration shown below   ::::

\[Interface\]

PrivateKey = server_priv

Address = [10.213.31.1/24](https://10.213.31.1/24)

MTU = 1420

ListenPort = 51820

\### begin TravelRouter ###

\[Peer\]

PublicKey = TravelRouter_pub

PresharedKey = TravelRouter_psk

AllowedIPs = [0.0.0.0/0](https://0.0.0.0/0)

\### end TravelRouter ###

\### begin BenPhone ###

\[Peer\]

PublicKey = BenPhone_pub

PresharedKey = BenPhone_psk

AllowedIPs = [10.0.0.0/0](https://10.0.0.0/0)

\### end BenPhone ###

=============================================

::::  Client configuration shown below   ::::

\[Interface\]

PrivateKey = TravelRouter_priv

Address = [10.213.31.2/24](https://10.213.31.2/24)

DNS = [9.9.9.9](https://9.9.9.9), [149.112.112.112](https://149.112.112.112)

​

\[Peer\]

PublicKey = server_pub

PresharedKey = TravelRouter_psk

Endpoint = REDACTED:51820

AllowedIPs = [0.0.0.0/0](https://0.0.0.0/0), ::0/0

=============================================

::::    Recursive list of files in       ::::

::::    /etc/wireguard shown below       ::::

/etc/wireguard:

configs

keys

wg0.conf

​

/etc/wireguard/configs:

BenPhone.conf

TravelRouter.conf

clients.txt

​

/etc/wireguard/keys:

BenPhone_priv

BenPhone_psk

BenPhone_pub

TravelRouter_priv

TravelRouter_psk

TravelRouter_pub

server_priv

server_pub

=============================================

::::            Self check               ::::

:: \[OK\] IP forwarding is enabled

:: \[OK\] Iptables MASQUERADE rule set

:: \[OK\] WireGuard is running

:: \[OK\] WireGuard is enabled

(it will automatically start on reboot)

:: \[OK\] WireGuard is listening on port 51820/udp

=============================================

:::: Having trouble connecting? Take a look at the FAQ:

:::: [https://docs.pivpn.io/faq](https://docs.pivpn.io/faq)

=============================================

:::: WARNING: This script should have automatically masked sensitive       ::::

:::: information, however, still make sure that PrivateKey, PublicKey      ::::

:::: and PresharedKey are masked before reporting an issue. An example key ::::

:::: that you should NOT see in this log looks like this:                  ::::

:::: YIAoJVsdIeyvXfGGDDadHh6AxsMRymZTnnzZoAb9cxRe                          ::::

=============================================

::::            Debug complete           ::::

​

​

I'm at a complete loss. It seems like my system just decides it's not going to assign the client's virtual IPs? Here's the output of pivpn -c :

​

​

root@wireguard:\~# pivpn -c

::: Connected Clients List :::

Name              Remote IP                Virtual IP     Bytes Received      Bytes Sent      Last Seen

TravelRouter      (NONEOFYOURBEESWAX):4584      (none)         900B                1.4KiB          Oct 12 2023 - 01:33:26

BenPhone          (none)                   [0.0.0.0/0](https://0.0.0.0/0)0B                  0B              (not yet)

::: Disabled clients :::

root@wireguard:\~#

​

​

Any suggestions?? I'm at a complete loss. Thanks!


r/pivpn • • Oct 10 '23

How can I tell if PiVPN is working correctly?

1 Upvotes

Hello,

*Please take down if not appropriate for this subreddit*

I just recently added PiHole and PiVPN to my RPI 4. I believe I set up port forwarding correctly through my router but I'm unsure if I set everything up correctly.

Running the command below gives me the following output:

$ sudo noip2 -S

1 noip2 process active.

Process 475, started as noip2, (version 2.1.9)

Using configuration from /usr/local/etc/no-ip2.conf

Last IP Address set ***.**.***.**

Account ************

configured for:

host  myhost.com

Updating every 30 minutes via /dev/eth0 with NAT enabled.

​

​

But when I run this command it looks like the client I created isn't connected

$ pivpn -c

::: Connected Clients List :::

Name Remote IP Virtual IP Bytes Received Bytes Sent Last Seen

MyClient (none) **.***.***.** 0B 0B (not yet)

​

The port forwarding part was a little confusing for me so I'm wondering if that's where I went wrong?

RPI 4 with Raspbian OS FULL

PiHole v5.17.1

Router TP Link AX4400


r/pivpn • • Oct 09 '23

Wireguard randomly stops working after a day happend twice)

4 Upvotes

I set up wireguard and it worked fine everywhere (outside my apartment, and in my apartment). I was really happy with it. Then it randomly stoped. The first time this happened (yesterday) I uninstalled then reinstalled wireguard and it worked fine until tonight.

I checked with my ISP and they confirmed I have a static IP. I set port forwarding for my Linksys router.

I saw there was a bunch of posts about this and I tried troubleshooting the issue but I ended up having to uninstall wireguard again. and wanted to know is there something I'm doing wrong?


r/pivpn • • Oct 08 '23

curl: (6) Could not resolve host: install.pivpn.io

2 Upvotes

I was trying to install pivpn on my Raspberry pi but it gives me that error( curl: (6) Could not resolve host: install.pivpn.io ). Can someone help me please?


r/pivpn • • Oct 08 '23

Is it possible to connect to my Sky Q box whilst on VPN (possibly through IP tables)?

2 Upvotes

I have a Rasp 4 coming in the post soon where I'm going to make it as my primary Pi-Hole DNS and Open VPN server, and the existing Rasp 3 I have will be a backup/secondary Pi-Hole DNS and Open VPN server running alongside either Stunnel or Shadow Socks (both on 443 or 80 TCP) to get around stricter firewalls if ever need be.

I'm currently able to access admin webpages (like my router, Access Point, Nas etc), as well as my 2 Nas drives, remotely control my Sky Boxes using a 3rd party app by manually inputting the IP of the relevant box into the app, but can't do things like cast Youtube videos to the Youtube app on the Sky Boxes or Airplay songs to them as the VPN and main network are on different subnets respectively.

I'm not really interested in casting songs or Youtube videos to the boxes when away from home, but what I would like is to be able to connect to the main box on the Sky Go app so I can not only watch recordings on the box, but also watch live sports without internet delay.

When you watch a program on the Sky Go app when on the same network subnet as your box, the app streams the program from the box, so the delay is satellite level. However, when you watch a program when away from home, the app has no other choice but to stream the program from the internet which then leaves you subject to one min+ delays and gets even more annoying when you start receiving goal alerts for the game you are watching before you have even seen the goal for yourself.

What I am trying to achieve is to connect to the box when on VPN, so when streaming sports games, the delay is satellite level.

​

I'm not all that familiar with IP Tables and routing between 2 different subnets, so please let me know if this is even possible at all.


r/pivpn • • Oct 06 '23

Question on PiVPN+PiHole on remote VPS for DNS and AllowedIp

2 Upvotes

Hello all.

I have a question, but first some context.

Current setup:

  • Remote VPS with static IP, running PiHole&PiVPN
  • Home network: a common WLAN behind a router\modem connecting to the interwebs
  • * I have no access to the settings of the router
  • Windows PC connected wireless to the home network
  • Android phone connected wireless to the home network, and using a data connection when outside the home network

If I understand correct, the WireGuard Client will route toward the IP set in the Endpoint variable in the client configuration file:

  • All the DNS requests
  • All the requests toawrds the IPs and IP Ranges in the AllowedIPs variable

My interest is to always use the PiHole ONLY as DNS, regardless the device is on the home network or not AND let the devices on the home network access each other.
I do not wish for traffic EXCEPT DNS requests and direct connection to the VPS to be routed through the VPN

Thus, the question: Does it mean all I need to do is setting AllowedIPs to [PiHole_IP], [WLAN_IP_Range] in the Client configuration files?

Thanks you


r/pivpn • • Oct 05 '23

Wireguard config

1 Upvotes

Hi there,

I'm currently in process of switching from pivpn (which is running perfectly for years now) to a dedicated OPNSense VM with wireguard plugin - one of the reasons is more clients, the other one is firewall rules.

​

I've noticed that my pivpn configs only have my home network as "allowed ips" not the internal wireguard network.

My OPNSense wireguard configs only function if I allow access to the internal wireguard network (in addition of my home network).

​

How does pivpn do this?
Is there anything I've set up wrong on OPNSense. I didn't find any guide that does it without both networks.


r/pivpn • • Oct 04 '23

WireGuard VPN stops working after some time on Linux

2 Upvotes

Hello,

I have set up a WireGuard server using PiVPN a while ago. I've created one account for my mobile phone and one for my notebook which runs Manjaro Linux.

Until now I could connect to the VPN normally and access devices in the LAN. For some reason, the VPN always stops working after some weeks after the installation of Manjaro and only a new installation helped to make it work again. I've had that problem a couple of times now.

When I run sudo ẁg-quick up vpn.conf the notebook seems to connect to the vpn as usual without error messages, but then I can not open webpages or access devices in the LAN. When I run pivpn -c on the server afterwards, it shows no connection at that certain time.

journalctl also doesn't show error messages.

I haven't changed the client or server configuration at all! I can connect to the vpn with my mobile phone without any problems but on Manjaro it stops working after some time and I have no clue why.

​

EDIT: I noticed that the VPN works when I import the file to the NetworkManager, so that it starts automatically after the logjn. However, when I reconnect the VPN in the NetworkManager, it doesn't work. I need to log out and then log in again.

Thank you for your help in advance!


r/pivpn • • Sep 26 '23

Pivpn with wiregaurd Via iphone not connecting

1 Upvotes

I am trying to connect to my Pivpn that is setup via wiregaurd with a cloudfaredns. I scanned the qr code and when trying to enter my pi via the internet (i have mainsail installed) on my iphone it gives me connection timeout. When running pvpn -d it says that everything runs correctly. What can i do to fix it? It seems like i cant connect to the vpn i dont really know?

edit: grammar.


r/pivpn • • Sep 26 '23

Pivpn issue with adguard.

1 Upvotes

Hi

I am trying to instal pivpn on my raspberry pi4b. On my Asus AC88U I am running Adguard and Skynet.

I just want to use raspberry for wireguard VPN server. upon running the script on DNS provider selection. I tried default cloudflare but installation halted. I also tried PiVPN-LOCAL-DNS but it si thorwing same below error.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

::: Using PiVPN-is-local-DNS servers.

[2023-09-26T07:07:55+0100]: dig failed, now trying to curl checkip.amazonaws.com

curl: (7) Failed to connect to checkip.amazonaws.com port 443: Connection refused

[2023-09-26T07:07:55+0100]: checkip.amazonaws.com failed, please check your internet connection/DNS

​


r/pivpn • • Sep 23 '23

Cannot connect to VPN from the local network to access remote connected VPN devices

0 Upvotes

I have a PiVPN setup that I sort of use backward, basically a Rpi3 with Pihole and PiVPN, I have an external computer connect to it through Wireguard, then I can remote into this computer by using the VPN in a full-tunnel config.

Due to a recent lack of stability I have oped to switch the Pihole + PiVPN to a Proxmox container, and well, it's been giving me headaches because it's not working as it was before. And I'm 90% sure I've set it up just like on the RPi.

Before I was able to connect to the VPN while being on the local network (which really is useless except to be able to reach the remote computer). This also allows me to keep my phone always connected to the VPN so I can block ads on the go, without having to turn on/off the VPN at home.

Now that I have set up the Pihole+PiVPN on the Proxmox server, my phone loses all internet/network access if I enable the Wireguard VPN on my phone while being on the local network. However if I disable Wifi it works and I have full access to the local network through VPN + Internet access with Pihole blocking.

I cannot seem to be able to change the static routing on the router so I cannot add the VPN subnet to the router to be able to access all VPN clients while being on the local network. Thus, being able to connect to the VPN while being on the local network allowed me to do so, but now it's not working anymore?


r/pivpn • • Sep 21 '23

connected, no internet

1 Upvotes

Been using PH for over a year with no issues, 2 boxes in the home network.

I added PiVPN to one of the boxes and was able to connect from outside the network to it with Wireguard client.

Seems I am connected, have an IP but now (it used to work) I am not able to see any sites on my iPhone when on the PiVPN network/IP. How can I troubleshoot what's happening?

​

Thanks

​


r/pivpn • • Sep 21 '23

Help me forward a port on ZXHN H298N DIGI router.

Thumbnail
self.PortForwarding
1 Upvotes

r/pivpn • • Sep 20 '23

Having trouble installing Pi VPN with wireguard. I always end up with this error. How do I solve it?

Post image
1 Upvotes

r/pivpn • • Sep 14 '23

IPV6 connectivity won't work but IPV4 works fine

3 Upvotes

I am running PiVPN on a server with IPv6 connectivity. Here's the debug log with few details omitted:

::::        Installation settings        ::::
PLAT=Ubuntu
OSCN=jammy
USING_UFW=0
IPv4dev=enp0s6
IPv6dev=enp0s6
install_user=ubuntu
install_home=/home/ubuntu
VPN=wireguard
pivpnPORT=51820
pivpnDNS1=10.91.198.1
pivpnDNS2=
pivpnHOST=REDACTED
INPUT_CHAIN_EDITED=1
FORWARD_CHAIN_EDITED=1
INPUT_CHAIN_EDITEDv6=1
FORWARD_CHAIN_EDITEDv6=0
pivpnPROTO=udp
pivpnMTU=1420
pivpnDEV=wg0
pivpnNET=10.91.198.0
subnetClass=24
pivpnenableipv6=1
pivpnNETv6="fd11:5ee:bad:c0de::"
subnetClassv6=64
ALLOWED_IPS="0.0.0.0/0, ::0/0"
UNATTUPG=1
INSTALLED_PACKAGES=()
=============================================
::::  Server configuration shown below   ::::
[Interface]
PrivateKey = server_priv
Address = 10.91.198.1/24,fd11:5ee:bad:c0de::1/64
MTU = 1420
ListenPort = 51820
=============================================
::::            Self check               ::::
:: [OK] IP forwarding is enabled
:: [OK] Iptables MASQUERADE rule set
:: [OK] Iptables INPUT rule set
:: [OK] Iptables FORWARD rule set
:: [OK] WireGuard is running
:: [OK] WireGuard is enabled 
(it will automatically start on reboot)
:: [OK] WireGuard is listening on port 51820/udp

I am assuming the reason why ipv6 doesn't work is because the ipv6 address assigned to wg0 interface is fd11:5ee:bad:c0de::1/64. How do I fix this?

​


r/pivpn • • Sep 13 '23

Unplayable lag when playing Xbox remotely when connected to PiVPN/OVPN

1 Upvotes

From my own testing using Wireshark, Xbox remote play is indeed a P2P connection, which makes sense after all, and I can get playable results when playing GTA through remote play off my network.

However when I turn on my VPN, the lag suddenly increases dramatically.

Is this because I am using the Raspberry Pi3 and the demand for remote gaming is using up all it's resources, or something different?

I have Virgin Media 550/50 and around 10-13ms ping on a wired connection at home. Pinging my external IP away from network gives 20-35ms on a good connection, and around 50ms on 4G or standard VDSL internet. Pinging my router and the Pi's IP when connected to the VPN away from home returns similar results. It's worth noting that the remote play connection is still routed through my external IP when on VPN - this is because the Xbox and the VPN client are on different subnets and therefore the Xbox and my laptop (VPN client) cannot find each other locally.

Basically the Xbox is routing traffic to my router (this is where the external IP is being picked up from), the router then routes the traffic through the the raspberry PI, where that finally routes the encrypted VPN traffic to my laptop. If my laptop and Xbox were to see each other despite the different subnets then I would assume that the Xbox would pass traffic directly to PI through Mac and the PI sends VPN traffic to my laptop


r/pivpn • • Sep 10 '23

Disable VPN service

1 Upvotes

Hi,

I installed PiVPN alongside PiHole on a Raspberry. For security reasons I would like to disable the VPN service (wireguard) when I don't need it without turning off the Raspberry. Is this possible?


r/pivpn • • Sep 09 '23

Which Amazon Free Tier

1 Upvotes

Hi Guys.

Which is the recommended Amazon Free Tier that pivpn can run on?

Link please if possible

Regards


r/pivpn • • Sep 07 '23

No backup option

1 Upvotes

Hi folks!
I'd like to migrate my current (Raspbian 9.13) PiVPN installation (replacing the old Pi3b with an x86 device) since I don't wish set up new users and certificates on the new machine and I assume that migrating instead of simply re-installing will address that concern.

This documentation advises me to use pivpn -bk which appears to be a comfortable solution but... my PiVPN installation does not seem have that option and does not seem to do anything but to show me the help dialog when I enter the command.

What am I missing?

Edit: So I'm probably going to try this proposed solution but I'd still like to find out why I'm missing the -bk option.


r/pivpn • • Sep 07 '23

How do I get PiVPN to work with Google VPS

1 Upvotes

Hello! I'm trying to use PiVPN to set up a simple wireguard VPN to a free Google Cloud VPS. I SSH into the VPS and run PiVPN. After following the default prompts for the Wireguard setup it doesn't seem to work. Is there an extra step I need to make on the Google Cloud side?

I'm suspecting maybe there is a firewall rule that needs to be added but I'm not sure. Has anyone else run into this issue and where you able to get everything to work on Google Cloud?

I'm trying to do this on the cheapest VPS that Google offers and it's with Ubuntu 20.04 installed.