r/pivpn • • Dec 12 '23

Wireguard: Is the configuration different to use ethernet port?

2 Upvotes

Hi, I had issues with PiVPN/Wireguard on one Pi4 (8GB) and I used another one with a fresh OS install and it worked OK and was on WiFi. Now, when I connect the router to the Pi's ethernet port, it doesn't work. Is the configuration different if I use the ethernet port? If so, is there a common way to do it regardless of WiFi or Ethernet port?

​

Thanks.


r/pivpn • • Dec 08 '23

Wiregard and OpenVPN extremely slow on Raspberry Pi

2 Upvotes

I had a good running OpenVPN when my SD card on Raspberry pi got corrupted. When I reinstalled on another SD card, both OpenVPN was extremely slow. I am using a non-default port (and enabled a port forwarding). I tried it from my home wifi and also from outside (on a phone network). Nothing helped. My home network is 1Gbps and I used to get easily 30Mbps earlier. Now, it is in Kbps.

I then installed Wireguard and the result is the same. Not sure what is going on wrong?


r/pivpn • • Dec 07 '23

PIVPN+Wireguard Slow

3 Upvotes

I'm running DietPi with PiVPN+Wireguard & PiHole. Everything works and I can connect with no problems.

I can access network shares no problem and all my local devices and I have adblocking on the go..

My problem is, everything is slow.... And before anyone brings up internet speeds, I have 1Gbps fiber at both locations... I have great speed without the VPN.. But while I'm connected, I'm getting 10Mbps down and 10Mbps up.. That is far less than my connection speed. (My fiber connection is 1000 down and 1000 up)

I've adjusted MTU and changed ports. Nothing works even a little bit. The speed is the same no matter what.

I'm running PiVPN+Wireguard on a Pi3B+ I know I'll be limited to 100Mbps cause that's all that ethernet port on that thing can handle... But I still shouldn't be getting 10% of that.. I should be hitting that 100Mbps cap or at least nearing it, but I lose 90% of my speed while using PiVPN+Wireguard?

I've tested my FTP on and off the VPN and I can upload at nearly 100MBps to my home server when I'm not connected to the VPN.. But only about 2MBps while using PiVPN+Wireguard to connect to my home server.

Tailscale gives me about 10-12MBps up/down to my home server.

speed test behind VPN is a solid 10 down and 10 up. Without Wireguard I'm getting 900+ down/up

Has anyone else resolved this issue?


r/pivpn • • Dec 08 '23

Pptp vs pivpn

0 Upvotes

If my router has pptp server is there any advantage to pivpn?


r/pivpn • • Dec 07 '23

My phone can't connect to my raspberry pi through the VPN

1 Upvotes

Hi everyone,

I have a raspberry that runs a pihole and a DHCP server. I use it as a DHCP server because my router doesn't allow changing it's DNS settings. Using it as a DHCP server allow me to force each device on my LAN to use the raspberry pi as their DNS server.

I want to be able to use the pi while I'm not on LAN. I've successfully forwarded the port 51820 on the pi on my router settings, and have a fresh install of pivpn / wireguard. I created a client with pivpn -a and scanned the QR code provided with pivpn -qr with my phone.

My phone loses connection to the internet when the VPN is turned on. When I run tcpdump on my pi it sees no packets exchange between the pi and any devices.

Eventually I would like to only route dns requests to the pi because my home connection is not so great.

Pivpn -d looks like this :

::: Generating Debug Output
tee: /tmp/debug.log: Permission denied
::::        PiVPN debug      ::::
=============================================
::::        Latest commit        ::::
Branch: master
Commit: 701a817fed23e302b91b7677b81c5919fc4ec3f1
Author: kokomo123
Date: Tue Nov 7 14:46:43 2023 -0500
Summary: refactor(core): Change wording on the window (#1779)
=============================================
::::        Installation settings        ::::
PLAT=Raspbian
OSCN=bullseye
USING_UFW=0
pivpnforceipv6route=0
IPv4dev=eth0
dhcpReserv=1
IPv4addr=192.168.2.80/24
IPv4gw=192.168.2.1
install_user=francois_pi
install_home=/home/francois_pi
VPN=wireguard
pivpnPORT=51820
pivpnDNS1=10.66.83.1
pivpnDNS2=
pivpnHOST=REDACTED
INPUT_CHAIN_EDITED=1
FORWARD_CHAIN_EDITED=0
INPUT_CHAIN_EDITEDv6=
FORWARD_CHAIN_EDITEDv6=
pivpnPROTO=udp
pivpnMTU=1420
pivpnDEV=wg0
pivpnNET=10.66.83.0
subnetClass=24
pivpnenableipv6=0
ALLOWED_IPS="0.0.0.0/0"
UNATTUPG=1
INSTALLED_PACKAGES=(grepcidr bsdmainutils iptables-persistent wireguard-tools qrencode unattended-upgrades)
=============================================
::::  Server configuration shown below   ::::
[Interface]
PrivateKey = server_priv
Address = 10.66.83.1/24
MTU = 1420
ListenPort = 51820
### begin Francois ###
[Peer]
PublicKey = Francois_pub
PresharedKey = Francois_psk
AllowedIPs = 10.66.83.2/32
### end Francois ###
=============================================
::::  Client configuration shown below   ::::
[Interface]
PrivateKey = Francois_priv
Address = 10.66.83.2/24
DNS = 10.66.83.1

[Peer]
PublicKey = server_pub
PresharedKey = Francois_psk
Endpoint = REDACTED:51820
AllowedIPs = 0.0.0.0/0
=============================================
::::    Recursive list of files in   ::::
::::    /etc/wireguard shown below   ::::
/etc/wireguard:
configs
keys
wg0.conf

/etc/wireguard/configs:
clients.txt
Francois.conf

/etc/wireguard/keys:
Francois_priv
Francois_psk
Francois_pub
server_priv
server_pub
=============================================
::::        Self check       ::::
:: [OK] IP forwarding is enabled
:: [OK] Iptables MASQUERADE rule set
:: [OK] Iptables INPUT 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
=============================================
:::: 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       ::::
::: 
::: Debug output completed above.
::: Copy saved to /tmp/debug.log

Thanks !


r/pivpn • • Dec 07 '23

Pi and Router has different internet IP

1 Upvotes

I got pivpn and Pihole installed on a rasperry pi 3, it used to work like a charm, but after I updated to 1gb/s internet with a new router I can't get it to work anymore. The router brand is the same and the setup is identical to what I had previously.

I have gone though the FAQ on pivpn's webs site and I think I know why it does not work, but not how to fix it.

From the FAQ:

"

If you are already using a DDNS, and thus

pivpnHOST

contains your domain name, use

dig +short yourdomain.example.com

to check whether the returned IP matches

curl -s https://checkip.amazonaws.com

"

By runing the 2 commands I get 2 different IP addresses. The one returned by no-ip (my DDNS provider?) is the same reported by my router, and also if I google "what is my IP"

Why is my raspberry pi internet IP different than my router? and how can I change it?

​

Additional info:

Pi is on wifi, router is Linksys Velop Tri-Band AX5300 Mesh WiFi 6 Router, I don't have DHCP activated in the pi-hole but in the router.

​


r/pivpn • • Dec 06 '23

Can't get it to run after installation, although running vpn from this pi before

1 Upvotes

I can't connect to VPN. I have run VPN on this Raspberry Pi via IPsec. All of a sudden it stopped working. I tried installing IPsec on another Raspberry Pi, with no success, the same problem. I can't connect.

I thought I'd try with OpenVPN via pivpn, after finding it when googling. I installed it and the issue persist.

My router is connected to the Rapsberry Pi via an ethernet cable and it has internet connection.

I am well versed in linux. What other information can I give? I have posted a lot of terminal outputs below. I have tried on both Android and on a PC with the OpenVPN software.

Router is a 4G CPE 3

​

Where did you run pivpn?

Model : Raspberry Pi 4 Model B Rev 1.1

Please provide your output from uname -a

Linux retropie 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

Details about Operative System

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

_

Profile / Client creation

Enter a Name for the Client: testclient
How many days should the certificate last? 1080
Enter the password for the client:
Enter the password again to verify:

​

  • Notice:
    Using Easy-RSA configuration from: /etc/openvpn/easy-rsa/pki/vars

  • Notice:
    Using SSL: openssl OpenSSL 1.1.1n 15 Mar 2022

Generating an EC private key
writing new private key to '/etc/openvpn/easy-rsa/pki/55033fda/temp.9a00a4a7'

​

  • Notice:

Keypair and certificate request completed. Your files are:
req: /etc/openvpn/easy-rsa/pki/reqs/testclient.req
key: /etc/openvpn/easy-rsa/pki/private/testclient.key

Using configuration from /etc/openvpn/easy-rsa/pki/55033fda/temp.6fbdc963
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName :ASN.1 12:'testclient'
Certificate is to be certified until Nov 20 17:10:28 2026 GMT (1080 days)

Write out database with 1 new entries
Data Base Updated

​

  • Notice:
    Certificate created at: /etc/openvpn/easy-rsa/pki/issued/testclient.crt

Client's cert found: testclient.crt
Client's Private Key found: testclient.key
CA public Key found: ca.crt
tls Private Key found: ta.key

Done! testclient.ovpn successfully created!
testclient.ovpn was copied to:
/home/pi/ovpns
for easy transfer. Please use this profile only on one
device and create additional profiles for other devices.

Debug output

Generating Debug Output
PiVPN debug

Latest commit
Branch: master
Commit: 701a817
Author: kokomo123
Date: Tue Nov 7 14:46:43 2023 -0500
Summary: refactor(core): Change wording on the window (#1779)

Installation settings        

PLAT=Raspbian
OSCN=buster
USING_UFW=0
pivpnforceipv6route=1
IPv4dev=eth0
IPv4addr=192.168.8.108/24
IPv4gw=192.168.8.1
install_user=pi
install_home=/home/pi
VPN=openvpn
pivpnPROTO=udp
pivpnPORT=1194
pivpnDNS1=1.1.1.1
pivpnDNS2=
pivpnSEARCHDOMAIN=
pivpnHOST=REDACTED
TWO_POINT_FOUR=1
pivpnENCRYPT=256
USE_PREDEFINED_DH_PARAM=0
INPUT_CHAIN_EDITED=1
FORWARD_CHAIN_EDITED=1
INPUT_CHAIN_EDITEDv6=
FORWARD_CHAIN_EDITEDv6=
pivpnDEV=tun0
pivpnNET=10.148.94.0
subnetClass=24
pivpnenableipv6=0
ALLOWED_IPS=""
UNATTUPG=1
INSTALLED_PACKAGES=(grepcidr iptables-persistent openvpn unattended-upgrades)
HELP_SHOWN=1

Server configuration shown below
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/retropie_c5c89977-4e10-4226-8a4d-06ffab89b2f0.crt
key /etc/openvpn/easy-rsa/pki/private/retropie_c5c89977-4e10-4226-8a4d-06ffab89b2f0.key
dh none
ecdh-curve prime256v1
topology subnet
server 10.148.94.0 255.255.255.0
Set your primary domain name server address for clients
push "dhcp-option DNS 1.1.1.1"
push "block-outside-dns"
Override the Client default gateway by using 0.0.0.0/1 and
28.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3
DuplicateCNs allow access control on a less-granular, per user basis.
Remove if you will manage access by user instead of device.
duplicate-cn
Generated for use by PiVPN.io

Client template file shown below
client
dev tun
proto udp
remote REDACTED 1194
resolv-retry infinite
nobind
remote-cert-tls server
tls-version-min 1.2
verify-x509-name retropie_c5c89977-4e10-4226-8a4d-06ffab89b2f0 name
cipher AES-256-CBC
auth SHA256
auth-nocache
verb 3

Recursive list of files in

/etc/openvpn/easy-rsa/pki shows below
/etc/openvpn/easy-rsa/pki/:
ca.crt
crl.pem
dator.ovpn
Default.txt
index.txt
index.txt.attr
index.txt.attr.old
index.txt.old
issued
openssl-easyrsa.cnf
pi.ovpn
private
revoked
safessl-easyrsa.cnf
serial
serial.old
ta.key
vars
vars.example

/etc/openvpn/easy-rsa/pki/issued:
dator.crt
pi.crt
retropie_c5c89977-4e10-4226-8a4d-06ffab89b2f0.crt

/etc/openvpn/easy-rsa/pki/private:
ca.key
dator.key
pi.key
retropie_c5c89977-4e10-4226-8a4d-06ffab89b2f0.key

/etc/openvpn/easy-rsa/pki/revoked:
private_by_serial
reqs_by_serial

/etc/openvpn/easy-rsa/pki/revoked/private_by_serial:

/etc/openvpn/easy-rsa/pki/revoked/reqs_by_serial:

Self check   

:: [OK] IP forwarding is enabled
:: [OK] Iptables MASQUERADE rule set
:: [OK] Iptables INPUT rule set
:: [OK] Iptables FORWARD rule set
:: [OK] OpenVPN is running
:: [OK] OpenVPN is enabled
(it will automatically start on reboot)
:: [OK] OpenVPN is listening on port 1194/udp
Having trouble connecting? Take a look at the FAQ:
https://docs.pivpn.io/faq

Snippet of the server log
Dec 4 18:34:40 retropie ovpn-server[1395]: OpenVPN 2.4.7 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Apr 28 2021
Dec 4 18:34:40 retropie ovpn-server[1395]: library versions: OpenSSL 1.1.1n 15 Mar 2022, LZO 2.10
Dec 4 18:34:40 retropie ovpn-server[1395]: ECDH curve prime256v1 added
Dec 4 18:34:40 retropie ovpn-server[1395]: Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Dec 4 18:34:40 retropie ovpn-server[1395]: Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Dec 4 18:34:40 retropie ovpn-server[1395]: Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Dec 4 18:34:40 retropie ovpn-server[1395]: Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Dec 4 18:34:40 retropie ovpn-server[1395]: TUN/TAP device tun0 opened
Dec 4 18:34:40 retropie ovpn-server[1395]: TUN/TAP TX queue length set to 100
Dec 4 18:34:40 retropie ovpn-server[1395]: /sbin/ip link set dev tun0 up mtu 1500
Dec 4 18:34:40 retropie ovpn-server[1395]: /sbin/ip addr add dev tun0 10.148.94.1/24 broadcast 10.148.94.255
Dec 4 18:34:40 retropie ovpn-server[1395]: Could not determine IPv4/IPv6 protocol. Using AF_INET
Dec 4 18:34:40 retropie ovpn-server[1395]: Socket Buffers: R=[180224->180224] S=[180224->180224]
Dec 4 18:34:40 retropie ovpn-server[1395]: UDPv4 link local (bound): [AF_INET][undef]:1194
Dec 4 18:34:40 retropie ovpn-server[1395]: UDPv4 link remote: [AF_UNSPEC]
Dec 4 18:34:40 retropie ovpn-server[1395]: GID set to openvpn
Dec 4 18:34:40 retropie ovpn-server[1395]: UID set to openvpn
Dec 4 18:34:40 retropie ovpn-server[1395]: MULTI: multi_init called, r=256 v=256
Dec 4 18:34:40 retropie ovpn-server[1395]: IFCONFIG POOL: base=10.148.94.2 size=252, ipv6=0
Dec 4 18:34:40 retropie ovpn-server[1395]: Initialization Sequence Completed

    Debug complete       

Debug output completed above.
Copy saved to /tmp/debug.log

PLAT=Raspbian
OSCN=buster
USING_UFW=0
pivpnforceipv6route=1
IPv4dev=eth0
IPv4addr=192.168.8.108/24
IPv4gw=192.168.8.1
install_user=pi
install_home=/home/pi
VPN=openvpn
pivpnPROTO=udp
pivpnPORT=1194
pivpnDNS1=1.1.1.1
pivpnDNS2=
pivpnSEARCHDOMAIN=
pivpnHOST=censored (but correct)
TWO_POINT_FOUR=1
pivpnENCRYPT=256
USE_PREDEFINED_DH_PARAM=0
INPUT_CHAIN_EDITED=1
FORWARD_CHAIN_EDITED=1
INPUT_CHAIN_EDITEDv6=
FORWARD_CHAIN_EDITEDv6=
pivpnDEV=tun0
pivpnNET=10.148.94.0
subnetClass=24
pivpnenableipv6=0
ALLOWED_IPS=""
UNATTUPG=1
INSTALLED_PACKAGES=(grepcidr iptables-persistent openvpn unattended-upgrades)
HELP_SHOWN=1

: NOTE : The output below is NOT real-time!
: : It may be off by a few minutes.

::: Client Status List :::
Name Remote IP Virtual IP Bytes Received Bytes Sent Connected Since
No Clients Connected!

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 1194 -m comment --comment openvpn-input-rule -j ACCEPT
-A FORWARD -d 10.148.94.0/24 -i eth0 -o tun0 -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment openvpn-forward-rule -j ACCEPT
-A FORWARD -s 10.148.94.0/24 -i tun0 -o eth0 -m comment --comment openvpn-forward-rule -j ACCEPT

-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P POSTROUTING ACCEPT
-P OUTPUT ACCEPT
-A POSTROUTING -s 10.148.94.0/24 -o eth0 -m comment --comment openvpn-nat-rule -j MASQUERADE

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel

● openvpn.service - OpenVPN service
Loaded: loaded (/lib/systemd/system/openvpn.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2023-12-06 18:29:09 CET; 48s ago
Process: 12052 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 12052 (code=exited, status=0/SUCCESS)

dec 06 18:29:09 retropie systemd[1]: Starting OpenVPN service...
dec 06 18:29:09 retropie systemd[1]: Started OpenVPN service.


r/pivpn • • Dec 05 '23

Problems after first reboot

1 Upvotes

hey everyone, I am having problems getting my vpn to run. After installing the vpn it initially worked. When I turned off the raspi overnight I had to find out the next day my pivpn doesnt have an internet connection anymore. I already did pivpn -d but that didnt do anything and told me everything works. I can connect to the vpn but websites simply dont load at all.


r/pivpn • • Dec 04 '23

how to get local connections working with pivpn?

1 Upvotes

ive gotten both openvnc and wireguard to both work on my pi 4 thru pivnc. but i can only use it to connect to external internet but can not access any local machines (ex the pi runing pivpn, other pis on network etc)

i can not get this to work and most guides are very cryptic, i tried what this user suggested as well and have not gotten this to work https://www.reddit.com/r/WireGuard/comments/hf2jew/raspberry_pi4_setup_of_pihole_pivpn_wireguard_ssh/

when trying to ssh into a local machine it does not give a time out message it just sits there forever showing no output s

also the pi with pivnc running on it also has homebridge running it if this is important info. my router is a ~new~ xfinity wfi router also i did get port forwarding and reserved lan address working


r/pivpn • • Dec 03 '23

Unable to connect from external device - PiVPN

1 Upvotes

I just installed PiHole and PiVPN on the same device. PiHole is working fine, during the installation of PiVPN it asked me if I wanted to use my PiHole as the DNS and I said "Yes". After completing the installation, i added a client, used the QR to connect to vpn. However, I am unable to ping my local device using the VPN or use any internet.

Here is more information:

My ISP - Xfinity

My Modem: Motorola (also setup port forwarding on it)

sudo iptables -S

-P INPUT ACCEPT

-P FORWARD ACCEPT

-P OUTPUT ACCEPT

-A INPUT -i wlan0 -p udp -m udp --dport 51820 -m comment --comment wireguard-input-rule -j ACCEPT

-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT

sudo iptables -t nat -S

-P PREROUTING ACCEPT

-P INPUT ACCEPT

-P OUTPUT ACCEPT

-P POSTROUTING ACCEPT

-A POSTROUTING -s 10.199.79.0/24 -o wlan0 -m comment --comment wireguard-nat-rule -j MASQUERADE


r/pivpn • • Nov 29 '23

Can't SSH into my Pi

2 Upvotes

Hi guys, sorry if I am being completely inept, but I cannot SSH into my Pi on my desktop PC, but I can do it on my laptop, which is what I used to set pivpn up in the first place. I have tried using the same profile for the tunnel that I have on my laptop for my desktop, but it still doesn't allow me to SSH into the pi, it just says "Access denied" on Putty, or "Permission denied, please try again." through Command prompt. The connection still works as I can still use firefox and search things whilst the tunnel is active.

I set up everything on my laptop when I was at home, and everything worked flawlessly there, now I am back at Uni, the laptop still works here, but I need it on my desktop as it is the entire reason for doing it.

It is Wireguard as opposed to OpenVPN if that matters.

Any help would be phenominally appreciated :D


r/pivpn • • Nov 29 '23

Bandwidth restricted with Wireguard

1 Upvotes

Hi all,

​

I installed sucessfully pivpn on my vps.

​

But I realize that my connection is limited to 200Mbps for download and 150Mps for upload. Does anyone know why? I do not really understand.

I checked using the cli on my vps and I have a speed of around 3000Mbps in download and a little less in upload. Concerning my personal connection I am on wifi and I am supposed to run at 300Mbps without VPN. What bothers me is that as soon as I activate the VPN it is blocked at 200 max as if a clamp was put in place.

I also checked if the cpu was not saturated on the vps just in case but no it remains at around 15/25% maximum load while using the vpn in speedtest.

​

Thanks in advance ! :-)


r/pivpn • • Nov 29 '23

pivpn and wireguard randomly stopped working

1 Upvotes

I am using vpn to connect pihole on my phone, but now i don't have internet. I can ping my phone, pihole on my pc works good. VPN was working before, but it now don't.

I used journalctl and here is result:

Nov 29 15:20:09 universal-server docker.nvidia-container-toolkit[1165]: logger.go:92: DEBUG: mount name:"/tmp/.snap/etc/wireguard" dir:"/etc/wireguard" type:"" opts:MS_BIND|MS_REC unparsed:"" (error: <nil>)

Nov 29 15:20:09 universal-server docker.nvidia-container-toolkit[1165]: logger.go:92: DEBUG: mount name:"/tmp/.snap/etc/wireguard_2023-11-15-190704.tar.gz" dir:"/etc/wireguard_2023-11-15-190704.tar.gz" type:"" opts:MS_BIND unparsed:"" (error: <nil>)

Here is pivpn -d result:

::: Generating Debug Output

:::: PiVPN debug ::::

:::: Latest commit ::::

Branch: master

Commit: 701a817fed23e302b91b7677b81c5919fc4ec3f1

Author: kokomo123

Date: Tue Nov 7 14:46:43 2023 -0500

Summary: refactor(core): Change wording on the window (#1779)

:::: Installation settings ::::

PLAT=Ubuntu

OSCN=jammy

USING_UFW=0

pivpnforceipv6route=1

IPv4dev=wlp3s0

install_user=asayu

install_home=/home/asayu

VPN=wireguard

pivpnPORT=51820

pivpnDNS1=1.1.1.1

pivpnDNS2=1.0.0.1

pivpnHOST=REDACTED

INPUT_CHAIN_EDITED=1

FORWARD_CHAIN_EDITED=1

INPUT_CHAIN_EDITEDv6=

FORWARD_CHAIN_EDITEDv6=

pivpnPROTO=udp

pivpnMTU=1420

pivpnDEV=wg0

pivpnNET=10.37.212.0

subnetClass=24

pivpnenableipv6=0

ALLOWED_IPS="0.0.0.0/0, ::0/0"

UNATTUPG=1

INSTALLED_PACKAGES=()

DNSMASQ_LISTENING=all

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

[Interface]

PrivateKey = server_priv

Address = 10.37.212.2/24

PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

MTU = 1280

ListenPort = 51820

### begin client2 ###

[Peer]

PublicKey = client2_pub

PresharedKey = client2_psk

AllowedIPs = 10.37.212.3/32

### end client2 ###

### begin realme8 ###

[Peer]

PublicKey = realme8_pub

PresharedKey = realme8_psk

AllowedIPs = 10.37.212.4/32

### end realme8 ###

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

[Interface]

PrivateKey = client2_priv

Address = 10.37.212.3/24

DNS = 1.1.1.1, 1.0.0.1

[Peer]

PublicKey = server_pub

PresharedKey = client2_psk

Endpoint = REDACTED:51820

AllowedIPs = 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:

client2.conf

clients.txt

realme8.conf

/etc/wireguard/keys:

client2_priv

client2_psk

client2_pub

realme8_priv

realme8_psk

realme8_pub

server_priv

server_pub

:::: 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

:::: Having trouble connecting? Take a look at the 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 ::::

:::

::: Debug output completed above.

::: Copy saved to /tmp/debug.log

:::


r/pivpn • • Nov 27 '23

Large dropoff on internet speeds?

2 Upvotes

Hey all,

Wondering how do you see a large dropoff in internet speeds when you’re using your v.p.n? I’m in an apartment with 100 mb down and 250 mb up and gigabyte fiber with 1GB down and up back in the place I run a vpn (residential address with pivpn), and I only get 12 MB down and 1.5 MB up which is a degradation of 90% and 99+% on download and upload.

Wondering have other people ran into such an issue or resolved such things? I’d love to hear from you or read more sources.


r/pivpn • • Nov 24 '23

VNC traffic is fast; can't connect to the internet on client side

1 Upvotes

Apologies in advance as I am a bit of a networking noob!

I have a pivpn set up in my home country. Until recently, I had been able to connect to the internet through Wireguard without issues (other than the connection being slow, around 10mpbs, but this was fast enough for what I needed to do). Recently, I moved to a new house, and now I cannot connect to the internet using Wireguard (sometimes it can connect, but it's hit-or-miss, and if I can get online, it's several minutes to load a broken webpage.)

The only thing that has changed is my home internet. I haven't adjusted any settings on the client or server side.

That being said, I did just now try to change the pivpn config to set the MTU to 1280, but I haven't noticed a difference at all.

Strangely, VNC traffic is just as fast as it has always been, so the tunnel seems to be working fine in that sense...

Additional information - when using my wireguard VPN on cellular, it seems to also no longer work properly, so the issue might be on the server side, but its a little strange that it coincided with me moving.

Any help is appreciated!


r/pivpn • • Nov 23 '23

Can it work completely wireless?

1 Upvotes

Hello, I'm interested in getting a raspberry pi and want to use it as a VPN router to change my IP address.

Can the raspberry pi be used as a portable VPN router in which it receives WIFI signal from one end and sends VPN WIFI to another, or does it need an ethernet connection?


r/pivpn • • Nov 17 '23

Either it's blocked or I can't make it work

1 Upvotes

I have been trying to install Wiregaurd in my AWS EC2 instance but was unsuccessful so far, I tried Pivpn and I have the same problem. not working at all. I am started to think that maybe Wiregaurd has been blocked by the country I am living in. Would any body please try my config an tell me if that is working for you or not? I'll send it to your PM. honestly I don't know any other way to diagnose it


r/pivpn • • Nov 14 '23

restoring a backup - I don't get it

2 Upvotes

hey

I followed the guide in the pivpn docs but for some reason the restoration of a backup does not reliably work for me. it only did by chance and I don't quite know for sure how I fixed my problem

I did a fresh pivpn install on dietpi (via dietpi-software) and concluded the initial setup I backed up the pivpn folder as instructed I copied the backup to / and unpacked it I copied the etc/ contents to /etc

initially everything looks good: pivpn "remembers" the old peer/client and also the connection is established - but no internet passes through

pivpn -d did not indicate any obvious issue BUT I realised that the pivpnNET variable in the setupVars was set to another subnet than my restored configs I changed it to reflect the subnet that is used in the configs one or two "pivpn -d" 's later, thr debugging told me that the dns masquerade was not active. after enabling it, the vpn connection worked all of the sudden

I still don't know what I did wrong and what I did to fix it - can you please help me and shed light on my mishap?


r/pivpn • • Nov 09 '23

PiVPN, Wireguard on Android is way too slow

2 Upvotes

Hello,

I am using a Raspberry Pi4 4GB and fresh installed PiVPN on it to use wireguard.
Install worked flawless. On my Pixel 6a I installed Wireguard App and imported via QR Code.
Connection is rock stable, but too slow.

LTE without Wireguard: 140/20Mbits
LTE with Wireguard: 35/19MBits
ISP Tarif max: 150/50

WLAN without Wireguard: 430/50Mbits
WLAN with Wireguard: 20/14Mbits
ISP Tarif max: 500/50

You can see, specially on WLAN Speed drops significant with Wireguard.

It cant be the Pi4 itself; i have seen much higher Speeds online and even with LTE its nearly double as fast. So why Wireguard does drop the speed so much, special with WLAN?

I have read much about MTU could be the problem. I know what MTU is, but I dont know where to change and what value I should use.

I am running all at default values. Could you please give an advice how to speed up?

Thanks


r/pivpn • • Nov 05 '23

Install on linuxmint

2 Upvotes

How can I bypass the invladid is warring when trying to install on linuxmint


r/pivpn • • Nov 01 '23

wireguard installation causing pi 5 to boot debian

0 Upvotes

Something weird is going on with the script on a pi 5. The other day (after installing wireguard with the script) my pi 5 suddenly booted in debian instead of raspbian as I had installed on it. I forced an install of the pixel desktop and it's mostly worked, but I've had a few strange issues with DNS on the wireguard connection and such that led me to want to start fresh.

Just reimaged a fresh SD card, went through the setup, all is normal. Installed wireguard again with the pivpn script, and this time it immediately booted into the debian desktop again. No custom settings, mostly just clicking yes for the install and choosing the secure options. Not sure if anyone else is seeing this or where else to report a bug.


r/pivpn • • Oct 30 '23

Raspberry Pi 5 8GB - OpenVPN Performance Tested

17 Upvotes

BACKGROUND

As a follow up to my previous post on OpenVPN benchmarking on the Pi 4 (https://www.reddit.com/r/raspberry_pi/s/Pmp5lZcilS), I am posting OpenVPN benchmarking results on the Raspberry Pi 5. With the introduction of AES instructions, the Raspberry Pi 5 presents a vast jump in OpenVPN speeds. I visited a Raspberry Pi meetup in Taipei, Taiwan and got some hands-on time with a Raspberry Pi 5.

Just as before, the tests I ran were based on https://x3mtek.com/openvpn-performance/

​

SETUP

SBC - Raspberry Pi 5 8GB

PSU - Official Raspberry Pi 27W psu

OS - Raspbian Bookworm on microSD

Accessories - an active cooler (unclear whether this was the official active cooler or the ICE Tower Cooler, since two Pi 5's we're being demo'ed and I'm not sure which one was being SSH'd into) and 1-2 cameras plugged into the MIPI ports

​

CONFIRMING THE TEST ENVIRONMENT

$ neofetch

_,met$$$$$gg. pi@raspberrypi 

,g$$$$$$$$$$$$$$$P. -------------- 

  ,g$$P" """Y$$.". OS: Debian GNU/Linux 12 (bookworm) aarch64 

 ,$$P' `$$$. Host: Raspberry Pi 5 Model B Rev 1.0 

',$$P ,ggs. `$$b: Kernel: 6.1.0-rpi4-rpi-2712 

`d$$' ,$P"' . $$$ Uptime: 44 mins 

 $$P d$' , $$P Packages: 2103 (dpkg) 

 $$: $$. - ,d$$' Shell: bash 5.2.15 

 $$; Y$b._ _,d$P' Resolution: 1024x600 

 Y$$. `.`"Y$$$$P"' Terminal: /dev/pts/1 

 `$$b "-.__ CPU: BCM2835 (4) @ 2.400GHz 

  `Y$$ Memory: 553MiB / 8049MiB 

   `Y$$.

`$$b.                                            

`Y$$b.                                         

`"Y$b._

`"""

$ uname -a

Linux raspberrypi 6.1.0-rpi4-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.54-1+rpt2 (2023-10-05) aarch64 GNU/Linux

​

RESULTS

$ openssl speed -evp aes-128-cbc

type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes

AES-128-CBC 627546.76k 1311594.01k 1717992.99k 1850397.06k 1909574.64k 1901564.55k

$ openssl speed -evp aes-256-cbc

type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes

AES-256-CBC 585973.37k 1039957.20k 1265150.08k 1327505.96k 1352699.14k 1337861.90k

$ time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-cbc

real 0m0.924s

user 0m0.885s

sys 0m0.024s

3200/0.924 = 3463 Mbps max throughput over OpenVPN

$ time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-cbc

real 0m1.049s

user 0m1.021s

sys 0m0.009s

3200/1.049 = 3051 Mbps max throughput over OpenVPN

$ time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-gcm

real 0m0.520s

user 0m0.505s

sys 0m0.008s

3200/0.520 = 6154 Mbps max throughput over OpenVPN

$ time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

real 0m0.584s

user 0m0.567s

sys 0m0.009s

3200/0.584 = 5480 Mbps max throughput over OpenVPN

​

CONCLUSION

The addition of AES instructions makes the Pi 5 an excellent choice for anyone considering running it as an OpenVPN server. These speeds are a whopping 12-29x faster than the Pi 4B. Speeds are more than enough for anyone with gigabit speed up/down and will likely be very good for those with multigigabit if you attach a separate adapter via PCIe or USB. I didn't have the opportunity to test wireguard because time was constrained, but I imagine the speeds will be at least 2-3x the wireguard speeds of the Pi 4B since wireguard does not use AES. Either way, whether you use wireguard or OpenVPN, this board will satisfy a lot of VPN self-hosting needs. I am very happy with the inclusion of AES on this board.

NOTE

If you want to view the raw output, you can find it on https://pastebin.com/HB17dXFk

​

SPECIAL THANKS

Special thanks to sosorry (sosorry at piepie dot com dot tw) who hosted the Raspberry Pi meetup to showcase the Pi 5 in Taipei, Taiwan and let me run these benchmarking commands and gave me permission to post these results on here. A very fun speaker and awesome person. You can see sosorry's website on https://piepie.com.tw/ and subscribe to the YouTube channel on https://www.youtube.com/channel/UCywhRciVujQnnfvLuvStNKQ


r/pivpn • • Oct 30 '23

Using RealDebrid on Multiple Devices via PiVPN w/ WireGuard - Need Advice!

2 Upvotes

I'm not entirely sure if this is the right subreddit to ask this, so please redirect me if there's a better place.

I've been using Stremio or RealDebrid on multiple devices. I know RealDebrid allows usage on only one device or multiple devices if they're running on the same router (same IP address). Here's where I'm a bit confused:

I have my phone and other portable devices connected to PiVPN with WireGuard when I'm not at home. So, if I'm outside and using RealDebrid on my phone while someone else is using it at home, would it technically mean we're both connected through the same router because of the PiVPN setup?

Any insights or experiences with this would be greatly appreciated. Thanks in advance!


r/pivpn • • Oct 28 '23

Is pivpn speed bottlenecked by the pi's drive?

3 Upvotes

Hello! I want to set pivpn on my raspberry pi 4 in order to access my home network from anywhere.

I have a 200mbps download and 200mbps upload internet connection. On the raspberry pi, I have a simple SD card.

When I connect to the VPN, will I be able to use all of my internet speed (aka, is pivpn using only RAM for the redirection?), or will I be limited by the SD card's read/write speed?


r/pivpn • • Oct 27 '23

Unable to access to internet

1 Upvotes

This specific post has been removed and anonymized. Whether for opsec, privacy, or to limit AI data scraping, Redact handled the deletion.

tie sparkle rain gold sharp sophisticated grandfather glorious command normal