Cannot connect to Wireguard with Dietpi Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
SirChris93
Posts: 5
Joined: Tue Jan 28, 2020 3:02 am

Cannot connect to Wireguard with Dietpi

Post by SirChris93 »

Hi, I'm new to both DietPi and Wireguard. I set them up but whenever I try to connect my Ubuntu OS to Wireguard through DietPi I get the following error

[#] ip link add vpn type wireguard
[#] wg setconf vpn /dev/fd/63
[#] ip -4 address add 10.x.x.x/24 dev vpn
[#] ip link set mtu 1420 up dev vpn
[#] sysctl net.ipv4.conf.vpn.forwarding=1 net.ipv4.conf.$(sed -n 3p /DietPi/dietpi/.network).forwarding=1
sed: can't read /DietPi/dietpi/.network: No such file or directory
net.ipv4.conf.vpn.forwarding = 1
sysctl: separators should not be repeated: ..forwarding
sysctl: cannot stat /proc/sys/net/ipv4/conf//forwarding: No such file or directory
[#] ip link delete dev vpn


What am i doing wrong?
User avatar
Joulinar
Posts: 2636
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot connect to Wireguard with Dietpi

Post by Joulinar »

Hi,

On which systems you are doing this? Your DietPi system or the Ubuntu one?
try to connect my Ubuntu OS to Wireguard through DietPi
I assume WireGuard Server is running on your DietPi system? And you have issues to start the WireGuard Server?

Code: Select all

can't read /DietPi/dietpi/.network: No such file or directory
This is your issue, as you missing the .network file. Usually it contains your network information like this

Code: Select all

root@DietPiVM1:/DietPi/dietpi# cat .network
0
0
eth0
192.168.0.13
ETH_IP=192.168.0.13
WLAN_IP=
root@DietPiVM1:/DietPi/dietpi#
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
SirChris93
Posts: 5
Joined: Tue Jan 28, 2020 3:02 am

Re: Cannot connect to Wireguard with Dietpi

Post by SirChris93 »

Thanks I fixed that issue
User avatar
Joulinar
Posts: 2636
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot connect to Wireguard with Dietpi

Post by Joulinar »

Hi,

pls can you let us know how you fixed the issues. It might be interesting for other users as well
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
bavejik
Posts: 2
Joined: Thu Feb 06, 2020 9:01 pm

Re: Cannot connect to Wireguard with Dietpi

Post by bavejik »

SirChris93 wrote: Sat Feb 01, 2020 2:46 am Thanks I fixed that issue
Hi buddy, can you share how did you get it fixed? Even looking for the same!

Regards,
Bave Smith
User avatar
Joulinar
Posts: 2636
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot connect to Wireguard with Dietpi

Post by Joulinar »

@bavejik

what exactly is your issue?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply