# Wireguard did not "survive" DietPi upgrade?

**URL:** https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085
**Category:** General Discussion
**Created:** [27 November 2022 20:03 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085 "2022-11-27T20:03:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![naddel91](https://dietpi.com/forum/user_avatar/dietpi.com/naddel91/32/2564_2.png) [@naddel91](https://dietpi.com/forum/u/naddel91)
#### Post date: [27 November 2022 20:03 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085/1 "2022-11-27T20:03:59Z")

</div>

Hi at all,

I just noticed “wg” or “wgshow” does nothing, although wireguard was successfully installed and worked fine a few days before.

Is there a way to check for errors when those commands don’t work? or do I have to uninstall/reinstall WireGuard?

best wishes!

EDIT: Reboot fixed it, I can connect, but no data is sent back to the client. port tells me “closed” when using web scanner, although router tells it is opened (green).  
Is this here still a thing?  
" **IP forwarding is disabled by default** on Raspbian so it’s extremely important to enable it for any of the `iptables` rules to work.

Enable IP forwarding in the Linux kernel by uncommenting or adding (uncommenting) `net.ipv4.ip_forward = 1` to `/etc/sysctl.conf` to persist the setting between system restarts. Use `sysctl -w net.ipv4.ip_forward=1` to enable IP forwarding immediately without having to reboot."

---

<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: [27 November 2022 20:37 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085/2 "2022-11-27T20:37:17Z")

</div>

When a kernel upgrade is done, a reboot is mandatory for WireGuard to work, since it’s a kernel module.

The `/etc/wireguard/wg0.conf` shipped with our install option should enable IP forwarding automatically once the interface is brought up 🤔.

---

<div class="post-metadata">

### Author: ![naddel91](https://dietpi.com/forum/user_avatar/dietpi.com/naddel91/32/2564_2.png) [@naddel91](https://dietpi.com/forum/u/naddel91)
#### Post date: [27 November 2022 20:39 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085/3 "2022-11-27T20:39:10Z")

</div>

scrap all that. client’s “nameserver” was misconfigured.

I told the client to use the wireguard/pihole IP as nameserver in order to block ads immediately. but unfortunately I have to use the routers IP which does not seem to use pihole as first DNS, but instead shows ads.

I think it is because wg network (10.x.x.x) is NOT “home network” (192.x.x.x) as my router uses. so that traffic is NOT put through pihole, right?

 ![dns1](https://dietpi.com/forum/uploads/default/original/2X/0/0ae8315ef9cca3743695f1beb173946a33e0c1fe.png)  
 ![dns2](https://dietpi.com/forum/uploads/default/original/2X/3/385372b69db257546b0ef1d3108a05abbec4e24b.png)

---

<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: [27 November 2022 21:26 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085/4 "2022-11-27T21:26:13Z")

</div>

If I’m not mistaken, when you setup the NAT iptables rules to forward traffic between VPN and local network (also part of our `wg0.conf`), you can use the Pi-hole’s internal IP address as client’s DNS. If the Pi-hole host is the VPN server as well, you can definitely use the VPN IP (`10.*`).

EDIT: Ah, but Pi-hole needs to be configured to allow DNS requests from all origins, else it allows those from LAN hosts only and blocks those from VPN attached hosts by default.

---

<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: [27 November 2022 21:35 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085/5 "2022-11-27T21:35:50Z")

</div>

> [@MichaIng](#):
>
> EDIT: Ah, but Pi-hole needs to be configured to allow DNS requests from all origins

yes correct. You need to `Permit all origins` within PiHole settings if using a VPN IP address 10.x.x.x for PiHole DNS

---

<div class="post-metadata">

### Author: ![naddel91](https://dietpi.com/forum/user_avatar/dietpi.com/naddel91/32/2564_2.png) [@naddel91](https://dietpi.com/forum/u/naddel91)
#### Post date: [27 November 2022 22:21 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085/6 "2022-11-27T22:21:18Z")

</div>

changed it and will test. I noticed there is a “new option” I did not remember from first setting up pihole. it is now the recommended option for all devices only 1 hop away which would be true for local if on another network, right?

![dns3](https://dietpi.com/forum/uploads/default/original/2X/d/d173b520201000671e7055b08a70428bb9776d64.png)

EDIT: works fine now when using PiHole IP as nameserver! Thanks!!!

---

<div class="post-metadata">

### Author: ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)
#### Post date: [28 November 2022 11:15 UTC](https://dietpi.com/forum/t/wireguard-did-not-survive-dietpi-upgrade/15085/7 "2022-11-28T11:15:02Z")

</div>

> [@naddel91](#):
>
> port tells me “closed” when using web scanner

Don’t trust that. WG is udp and it won’t respond to probes, if the packet is not correct.
