Special VPN request

I am running a DietPi server on a Raspi. On this server in addition are running ZeroTier Client, Samba Server and VPN Server.

Access to all my files from abroad using ZeroTier and Samba works great.

What I now want to realize is to set up a private VPN, either using the ZeroTier IP or my Home-IP provided from my provider.

I already set up VPN… but something I’m doing wrong. Is there any one who realized something? The only thing why I want to set up this “construction” is to bypass geo fencing.
… using my home Internet connection for Television/Radio services.
thanks in advance
Karl

Hi,

you could start to let us what kind of VPN you have setup and what the exact issues are? Basically if you are going to setup a VPN server, it would duplicate ZeroTier to a certain degree as both will basically do the same, connect your mobile device back to your home network.

I use DietPi VPN… I know that VPN and ZeroTier are for similar usage. But I cannot manage to use ZeroTier for using my Austrian Internet Connection.

Example: Now I am in Norway. If I want to look Austrian TV… no chance. But if I can route my traffic over my Austria router, it should work.
As I was not able to realize this with ZeroTier I tried to set up DietPI VPN…. But with no success… I import the generated Conf-File… I connect to the new VPN - but I canˋt can get access to the internet.
???

What kind of configuration file your created? How did you do that?

Maybe there is a misunderstanding. DietPi-VPN is not a VPN server. This is a client tool, that allows you to connect to a public VPN provider.

You would need to have a look to our VPN server options like WireGuard, OpenVPN and/or PiVPN, if you like to setup a VPN server.

It’s right that using a remote node Internet connection via ZeroTier is not trivial and the official guide has some issues one needs to be careful with. I suggest to use WireGuard which gives you by far best performance. It also makes ZeroTier obsolete since the WireGuard clients are available for (nearly) all platforms.

Our WireGuard option is slim but requires some manual console work to setup multiple clients: VPN Software Options - DietPi.com Docs
Remote Internet usage will work OOTB.

PiVPN allows to select WireGuard as well and gives you a more guided CLI: VPN Software Options - DietPi.com Docs

I wrote a failure yesterday. I did not installed DietpiVPN but PiVPN… as Protocol I used Wireguard.
By now I uninstalled everything and will make a new try after my holiday.

My thing is, that I want not to waive Zero-Tier!
The question is: Do I need another solution beside Zero-Tier to use my home Internet connection abroad? Or do you think that I can realize this demand with ZeroTier only?

It is possible with ZeroTier only, but a network bridge needs to be setup manually via /etc/network/interfaces.d. With ZeroTier the common IP redirection and firwarding rules do not work, like with regular VPN servers.

AHH just a warning. Don’t follow ZeroTier guide to setup the bridge. Just in case you are going to try.

Way better to use native Wireguard for this scenario.

Domyou think I can find some descriptions e.g. with examples how to do so? Thank younvery much.
Karl

At least I don’t have one

I’ll also need some time to derive the needed from the ZeroTier docs and convert then into ifupdown configs.

I now installed Wireguard as recommended as user Dietpi with sudo but the behaviour is not as described in the web. Either can I copy the conf-file nor the QR-Code apperars, which should help to configure any other clients.
I tried to make a chmod 777 to etc/wireguard/wg0-client.conf… but this did not work, too…
thank you very much in advance
Karl

it would be helpful if you can share an error message while trying to print the QR code. And how do you try to copy the configuration file?

During the installation the system asks me for the public IP and nothing else… No QR-code appears at the end of the installation. The Conf-file is placed in /etc/wireguard.
I tried to copy it via cp /etc/wireguard… to a directory which I can access from my work pc via smb… (my movies) But this does not work … Message: On my Kubuntu work PC=Access denied to…
Thanks in advance
Karl

what exactly you have installed? Which software title? And did you have a look to our online docs? There some usefull information VPN Software Options - DietPi.com Docs

I installed package 172(=Wireguard) and of course I looked at the online documentation

On the WireGuard docs, there are commands on how to print the QR code. Something you need to do manually. It’s not shown automatically as part of the install process.

grep -v '^#' /etc/wireguard/wg0-client.conf | qrencode -t ansiutf8

Replace the wg0-client.conf name with a client config file existing on your side.

Usually this should work. At least this is how I migrated my entire configuration from A to B. Most important is to replace server configuration wg0.conf as this is the one containing important information.

Thanks a lot to your help. I now could manage, that I received the QR-code and from my Smartphone now I have an existing VPN-tunnel… For the first time in my live… I am very grateful for that and your help.

The net thing really is how I can manage to copy this conf-file to my abroad-PC.
I tried:
dietpi@DietPi:/etc$ sudo cp /etc/wireguard/wg0-client.conf /mnt/AV-Platte/Filme

But nothing happens… The User dietpi HAS wrights to write into “Filme”. But it seems that the file cannot by copied??? So how can I manage to bring this file to another PC to import it there?

and is there a way how to controll if a VPN tunnel is used at the moment… For controlling purposes?
many thanks
Karl

1 Like

Basically you can’t use the same peer config file on more than 1 client. Otherwise you will have conflicts. Or at least you can’t use them at the same moment. I would recommend to create one configuration per client. How to do is described on our online docs as well.

the client file should have read access for root user only. Have a look if the file has been copied at all

sudo ls -la /mnt/AV-Platte/Filme/wg0*

it is there:

dietpi@DietPi:~$ sudo ls -la /mnt/AV-Platte/Filme/wg0*
-rw------- 1 root root 1339 26. Jul 21:25 /mnt/AV-Platte/Filme/wg0-client.conf

My attempt would be now: chmod 777 wg0*… so that I can even see and copy the file on the client from and to another client???
BR Karl