Pivpn

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

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?

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

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

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 ?

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

can you try following

systemctl enable openvpn.service
reboot
systemctl status openvpn.service

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

Just login as user root

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

if it is working, probably.

i am going to try this and i will let you know what happens i will be able to do so later on tonight. :slight_smile:

i have tried this it works on the command line interface but my clients still cannot connect to the vpn any idea as to why ? or what i can use to fix it ?

what is the status of OpenVPN right after reboot

systemctl status openvpn.service

it says it is active when i have checked

this is the case right after reboot?

also would you be able to let me know how to increase the download and upload speed over the vpn cause when my clients are downloading files or uploading it is extremely slow

I’m not a OpenVPN expert. Might be better to check on a VPN specialized board. As well WireGuard has way better performance compare to OpenVPN