Hi @ll,
I’m new and I need so.e support.
I have buy my first pi 4/2gb for a vpn gateway & pihole.
I have installed dietpi,pihole and pivpn…
Pihole works already great in my network, but I need help to configure my purevpn account.
I have installed pivpn with openvpn option…
So, now where should I put this files?
ca.crt
Auth.txt
Wdc.key
*.ovpn (server)
Another question is if there are a possibility to have a webif for openvpn if I want to change server location…
PiVPN is actually meant to setup a VPN server, how a client. However, bare OpenVPN can be used for both.
It should work to put the files into /etc/openvpn/.
Rename the .ovpn file to have a .conf ending.
Then start it via: systemctl start openvpn@ with being the filename without the ending.
Coincidentally we’re working on a dietpi-nordvpn rewrite for DietPi v7.1 that will allow to use custom .ovpn files .
Take care that either the server supports IPv6 or disable it on the client to not have IPv6 leaks or failing requests.
Also dietpi-software OpenVPN selection sets it up for server usage. You could uninstall PiVPN, but it does not hurt. In case you might need to reinstall the plain OpenVPN package: apt install openvpn
The lack of an OpenVPN client setup is also the reason I like the dietpi-nordvpn rework. It will be called dietpi-vpn then btw .
What do you mean by this? It is dropped when the killswitch is enabled, so you mean to also allow forwarded requests to the VPN server and LAN by default, so that the VPN connection can be shared to the LAN?
VPN_SERVER in the first place is a variable to have the correct OVPN file selected/created. So in case of NordVPN and ProtonVPN it’s the other way round: The variable defines the OVPN file. If it would not match the actually contained remote IP/hostname, then the killswitch would break the VPN server connection, which is fine since we don’t want to establish a connection to a server that is not represented by the selected server/variable name. In case of a custom OVPN file, the variable is already derived from the file, so that that killswitch is assured to work correctly: https://github.com/MichaIng/DietPi/blob/dev/dietpi/dietpi-vpn#L128
Same with PROTOCOL, only that it does not play any role for a custom OVPN file. But since the variable is stored in the settings file, to avoid confusion, we could indeed get it from the custom OVPN file to have the settings file showing the correct protocol.
About PORT I agree that this should be scraped from the OVPN file. In case of ProtonVPN we currently use a variety of multiple ports, but to keep it simple I think we should stick with 1194 only: https://www.reddit.com/r/ProtonVPN/comments/5z17eb/what_ports_are_being_used/
It’s the same with NordVPN. For a custom OVPN file, to not make it too complicated, we should as well expect a single remote (or port) entry only, so that we can scrape one port and use that for the killswitch.
By the ISP? You mean by the client? Could you explain a bit more? I mean any DNS can be used, but requests are tunnelled. The same should be true when using the VPN provider’s DNS, which should work even when not allowing to connect directly to it. But I think I misunderstand what you mean .
Yes, the VPN can be shared with the LAN or a roadwarrior incoming to a VPN server.
Excellent!
Let me clarify. I am not exactly sure at which point these rules will be applied, so I wanted to cover the case that the tunnel is still not up, so the nameserver to resolve the hostname of the tunnel endpoint needs to be routed over the ISP, hence it needs to be allowed.