# Wireguard and static IP on RPi4 B

**URL:** <https://dietpi.com/forum/t/wireguard-and-static-ip-on-rpi4-b/3468>\
**Category:** Troubleshooting\
**Created:** [8 September 2019 19:39 UTC](https://dietpi.com/forum/t/wireguard-and-static-ip-on-rpi4-b/3468 "2019-09-08T19:39:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dregilley](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/8c91f0/32.png) [@dregilley](https://dietpi.com/forum/u/dregilley)\
**Post date:** [8 September 2019 19:39 UTC](https://dietpi.com/forum/t/wireguard-and-static-ip-on-rpi4-b/3468/1 "2019-09-08T19:39:02Z")

</div>

First things first, total Linux / RPi / DietPi newbie here. Background is public safety enterprise IT, but all Windows.

Recently discovered Wireguard and DietPi. Got everything up and running until I tried setting a static IP on my RPi4 B using dietpi-config. It immediately broke Wireguard. I tried setting the static before installing wireguard and after the install, neither worked.

With the static IP in place wireguard failed to load at startup and I got the following results from “systemctl status [wg-quick@wg0.service](mailto:wg-quick@wg0.service)”. If I revert back to DHCP it loads fine. Currently running with a DHCP reservation at the router so all is working, just figured it might bite someone else?

Process: 552 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=255/EXCEPTION)  
Main PID: 552 (code=exited, status=255/EXCEPTION)

Sep 08 20:34:03 DietPi wg-quick[552]: [#] wg setconf wg0 /dev/fd/63  
Sep 08 20:34:03 DietPi wg-quick[552]: [#] ip -4 address add 10.9.0.1/24 dev wg0  
Sep 08 20:34:03 DietPi wg-quick[552]: [#] ip link set mtu 1420 up dev wg0  
Sep 08 20:34:03 DietPi wg-quick[552]: [#] sysctl net.ipv4.conf.wg0.forwarding=1 net.ipv4.conf.$(sed -n 3p /DietPi/dietpi/.network).forwarding=1  
Sep 08 20:34:03 DietPi wg-quick[552]: net.ipv4.conf.wg0.forwarding = 1  
**_Sep 08 20:34:03 DietPi wg-quick[552]: sysctl: cannot stat /proc/sys/net/ipv4/conf/NONE/forwarding: No such file or directory_**  
Sep 08 20:34:03 DietPi wg-quick[552]: [#] ip link delete dev wg0  
Sep 08 20:34:04 DietPi systemd[1]: [wg-quick@wg0.service](mailto:wg-quick@wg0.service): Main process exited, code=exited, status=255/EXCEPTION  
Sep 08 20:34:04 DietPi systemd[1]: [wg-quick@wg0.service](mailto:wg-quick@wg0.service): Failed with result ‘exit-code’.  
Sep 08 20:34:04 DietPi systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.

---

_[View the full topic](https://dietpi.com/forum/t/wireguard-and-static-ip-on-rpi4-b/3468)._
