# Additional function for my DietPi-Baby

**URL:** https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393
**Category:** General Discussion
**Tags:** services
**Created:** [28 December 2022 09:15 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393 "2022-12-28T09:15:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![KarlExler](https://dietpi.com/forum/user_avatar/dietpi.com/karlexler/32/5163_2.png) [@KarlExler](https://dietpi.com/forum/u/KarlExler)
#### Post date: [28 December 2022 09:15 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393/1 "2022-12-28T09:15:43Z")

</div>

My Pi acts as Pihole, Wireguard-, SMB and NFS- and Plexserver. And “he” does" this in a great manner. Now I am asking myselve if it is possible to use it as VPN-Server IN ADDITION.  
To avoid missunderstanding. I am often abroad and sometimes I need to use my home internet connection. For that case DietPi acts as Wireguard-VPN Server. This works well.

But when I am at home I sometimes need a VPN on different devices (Tablett, Smartphone, FiretV) and in that case it would be convenient to use a central “VPN point” e.g. the Dietpi.

In my humble imagination the Dietpi connected via Ethernet to the router establishes a VPN to any VPN-Provider and makes it available within its local network via WLAN.

Many thanks for usefull hints and a Happy New Year  
Karl

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [28 December 2022 10:08 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393/2 "2022-12-28T10:08:36Z")

</div>

Hi Karl,

Happy New Year in advance to you as well.

Generally this can work. But, if I’m not mistaken, the IP forwarding and NAT rules applied in `/etc/wireguard/wg0.conf` need to be adjusted to forward incoming traffic from VPN clients to the VPN client component interface, `wgX` or `tun0` (instead of e.g. `eth0`), depending on whether you connect via WireGuard or OpenVPN to the provider. And a killswitch usually cannot be used, as it blocks communication with the VPN clients, unless some more firewall rules are added to allow that explicitly.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [28 December 2022 10:38 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393/3 "2022-12-28T10:38:56Z")

</div>

> [@KarlExler](#):
>
> I sometimes need a VPN on different devices (Tablett, Smartphone, FiretV)

this would be the main challenge as you always need to reconfigure your network device. Because your clients need to change the gateway used once you like to use the VPN tunnel. Means to switch back and forth between router and DietPi 😉

---

<div class="post-metadata">

### Author: ![KarlExler](https://dietpi.com/forum/user_avatar/dietpi.com/karlexler/32/5163_2.png) [@KarlExler](https://dietpi.com/forum/u/KarlExler)
#### Post date: [28 December 2022 12:22 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393/4 "2022-12-28T12:22:23Z")

</div>

I am aware about this. On PC/Laptop and Smartphone I could solve this easy via a script on FireTV I could easily do this manually…  
Perhaps I can use a Proxy which is used by all devices as gateway and centrally I define wether this proxy goes directly into the internet or uses a VPN???

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [28 December 2022 15:07 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393/5 "2022-12-28T15:07:32Z")

</div>

well you could setup device hosting DietPi as “router” and use it as default gateway. But personally I don’t have a guide for this.

---

<div class="post-metadata">

### Author: ![bin4ry](https://dietpi.com/forum/user_avatar/dietpi.com/bin4ry/32/2013_2.png) [@bin4ry](https://dietpi.com/forum/u/bin4ry)
#### Post date: [30 December 2022 14:41 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393/6 "2022-12-30T14:41:42Z")

</div>

I’m not an expert at all but i believe you can achieve what you’re looking for with,

Tailscale:

> **[DietPi.com Docs - VPN Software Options](https://dietpi.com/docs/software/vpn/#tailscale)**
>
> Description of DietPi software options related to VPNs

Have also a look at sub nets router, this will put all your devices even those that can’t connect ( old printer, tv, smartwatch etc ) directly behind Tailscale VPN.

> **[Subnet routers and traffic relay nodes](https://tailscale.com/kb/1019/subnets/)**
>
> Learn how to relay traffic from your Tailscale network onto your physical subnet.

As for Pi-hole, if you what you can set it up on, the Tailscale admin dashboard under dns name server,

---

<div class="post-metadata">

### Author: ![KarlExler](https://dietpi.com/forum/user_avatar/dietpi.com/karlexler/32/5163_2.png) [@KarlExler](https://dietpi.com/forum/u/KarlExler)
#### Post date: [30 December 2022 15:10 UTC](https://dietpi.com/forum/t/additional-function-for-my-dietpi-baby/15393/7 "2022-12-30T15:10:11Z")

</div>

Those solutions cańt satisfy my requirements. I know ZeroTier very well. It’s the backbone of my network, but for this purposes it does not fit.  
thank you anyway  
Karl
