pivpn: Unable to connect to PiVPN

PiVPN Issue Template

Install is successful. All links are pastebin. I removed my ip address from logs containing them.

Issue

Have you searched for similar issues and solutions?

Yes, but none of them worked.

Console output of curl -L install.pivpn.io | bash

https://pastebin.com/7EvKLvdh

Console output of pivpn add or pivpn add nopass

https://pastebin.com/4TUVsTQr

Console output of pivpn debug

https://pastebin.com/JTDxQ101

Console Output of sudo iptables -t nat -S

https://pastebin.com/rRKR7JEQ

Console Output of sudo iptables -S

https://pastebin.com/rH5QP83v

output of sudo netstat -uanp | grep openvpn

https://pastebin.com/5RZXS5WV

Have you taken any steps towards solving your issue?

Tried googling, and came across sudo systemctl status openvpn@server.service, but I don’t have error output.

The user I’m putting pivpn on is connected by using my RSA passphrase as I have set up a key pair. UFW is installed on the pi. Port 1194 is forwarded to 192.168.1.10[static] which is my RPi3. It is also the only port open. I have Pi-Hole Installed, so I changed the listen-address in dnsmasq to 127.0.0.1, 192.168.1.10, 10.8.0.1

Here is the output of my iPhone.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 30 (11 by maintainers)

Most upvoted comments

@sbrl for my understanding iptables-persistent only ensures to any changes to your iptables config, remains when you reboot your O.S. but the same thing does ufw, it ensures to keep your config after reboot, so, I think you have twice the same functions, I think this causes that the rules get mess, when you boot your O.S. and you have to reload the config, just because the mess caused by iptables-persistent and ufw, This is my though, I have removed the iptables-persistent with no secundary effects, and now everything works like a charm on my RPI, best regards. P.S. Sorry about my english.

Hey! I think I’ve run into this bug myself. Here are my observations:

  • Executing sudo ufw reload fixes the issue.
  • Rebooting causes the issue to crop up again.

I’m running on a Raspberry Pi 3 with Raspbian 9.6 (stretch).

Here’s an extract from /var/log/ufw.log just after a reboot:

Dec 28 20:58:45 SERVER_NAME kernel: [50042.744362] [UFW BLOCK] IN=eth0 OUT= MAC=************** SRC=****CLIENT_PUBLIC_IP***** DST=****SERVER_PRIVATE_IP**** LEN=82 TOS=0x00 PREC=0x00 TTL=52 ID=53404 DF PROTO=UDP SPT=59252 DPT=1194 LEN=62

Upon executing sudo ufw reload, the VPN then works.

Steps to reproduce

  1. Enable UFW
  2. Install & setup PiVPN
  3. Wonder why it’s not working - and then remember you need to allow it through ufw (execute sudo ufw allow 1194/udp)
  4. Observe the OpenVPN server working & accepting clients
  5. Reboot the server.
  6. Observe the OpenVPN server not working. Check /var/log/ufw.log for evidence that UFW is blocking packets
  7. Execute sudo ufw reload
  8. Observe the OpenVPN server working again.

Is there any fix for this?