Pivpn

Having issues with your DietPi installation or found a bug? Post it here.
DPINoob786
Posts: 22
Joined: Fri Mar 05, 2021 3:26 pm

Pivpn

Post by DPINoob786 »

Hi All.
trust you're well.

Please note I am a noob but find this OS very interesting, I have installed Pivpn and samba nas server my goal is to have this vpn allow my friends and I to access the share and trade movies and anime. I have tested this and it works like a charm my cousin was able to connect to my vpn and the nas.

My issues are the following if someone could please help me with these commands in the simplest way possible :

(1) on the nas which is already built and mapped to my windows pc, how do password protect a certain folder or is access base enumerations available for dietpi?

(2) i have noticed that the speeds on upload and download through the vpn is pretty slow like 25kbps slow on up and down is there any way i can increase this cause i have a 10mb line?

(3) unfortunately due to having a prepaid electricity system I sometimes have to turn of the vpn and nas and when I turn it back on I am able to access the nas share with no troubles and its data but not the vpn, is there a way command that I could use to maybe restart the vpn ?

I know I am asking for alot at once but please some one help me :)
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Pivpn

Post by Joulinar »

Hi,

the access to the NAS is basically manged by SAMBA and not something DietPi is doing. You could create different folder and configure different exports based on different users.

for the VPN, which one you selected in PiVPN? WireGuard or OpenVPN?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DPINoob786
Posts: 22
Joined: Fri Mar 05, 2021 3:26 pm

Re: Pivpn

Post by DPINoob786 »

so I have chosen openvpn through pivpn, unfortunately due to electricity been prepaid at my house i need to switch unnecessary power usage. so when I switch the RaspberryPi of and back on the vpn clients i have created cannot connect to it.

i can add users and make it such where i can download the vpn from the web

i restarted the vpn and can see it is active but client cant still connect is there a fix for this so that if I have to cut of the power from the pi i can bring this back up again
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Pivpn

Post by Joulinar »

just a question, how do you restart the VPN after reboot.

Regarding VPN performance, you could have a look to WireGaurd. It should have a way better performance compare to OpenVPN
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DPINoob786
Posts: 22
Joined: Fri Mar 05, 2021 3:26 pm

Re: Pivpn

Post by DPINoob786 »

i use this command /etc/init.d/openvpn to either restart reload see vpn status, i understand there could be a better chance with wiregurad but i have become accustomed to openvpn is there any way i can help clients connect again after a shutdown and restart what could i do ?
DPINoob786
Posts: 22
Joined: Fri Mar 05, 2021 3:26 pm

Re: Pivpn

Post by DPINoob786 »

root@HomeNET:~# /etc/init.d/openvpn status
● openvpn.service - OpenVPN service
Loaded: loaded (/lib/systemd/system/openvpn.service; enabled; vendor preset: enabled)
Active: active (exited) since Sun 2021-03-07 18:17:05 CAT; 1 day 2h ago
Process: 356 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 356 (code=exited, status=0/SUCCESS)

Vul 07 18:17:05 HomeNET systemd[1]: Starting OpenVPN service...
Vul 07 18:17:05 HomeNET systemd[1]: Started OpenVPN service.


according to the command i have used the vpn is started and the status is active however my clients cannot connect
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Pivpn

Post by Joulinar »

can you try following

Code: Select all

systemctl enable openvpn.service
reboot
systemctl status openvpn.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DPINoob786
Posts: 22
Joined: Fri Mar 05, 2021 3:26 pm

Re: Pivpn

Post by DPINoob786 »

thank you i will try that, the command you have given me below ok, once i log into my Rpi do i just run that command as it or do i need to get into any pre-requisite commands first, reason why i ask is i remember trying something like this and got a bash not found something like that.

systemctl enable openvpn.service
reboot
systemctl status openvpn.service
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Pivpn

Post by Joulinar »

Just login as user root
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DPINoob786
Posts: 22
Joined: Fri Mar 05, 2021 3:26 pm

Re: Pivpn

Post by DPINoob786 »

also will this commend help get my clients back up with connecting to my vpn
Post Reply