sipeed / NanoKVM

NanoKVM: Affordable, Multifunctional, Nano RISC-V IP-KVM
GNU General Public License v3.0
3.1k stars 51 forks source link

WireGuard network interfaces? #29

Closed razuritta closed 2 months ago

razuritta commented 2 months ago

Hello, could you please add wireguard kmod support for it? Using modprobe wireguard or adding wireguard device ip link add wg0 type wireguard both does not work. wg command seems present though.

it would be pretty useful when using wireguard to connect to the management network segment.

Thanks. :)

lakdif commented 2 months ago

The wireguard kmod is part of the kernel since 5.6. NanoKVM has 5.10.4. Maybe you meant ip link add dev wg0 type wireguard ? https://www.wireguard.com/quickstart/

razuritta commented 2 months ago

The wireguard kmod is part of the kernel since 5.6. NanoKVM has 5.10.4. Maybe you meant ip link add dev wg0 type wireguard ? https://www.wireguard.com/quickstart/

Oh, sorry, I mean, using ip link add command does not create a wireguard interface. It produces the following output.

# ip link add wg0 type wireguard
ip: RTNETLINK answers: Not supported
razuritta commented 2 months ago

I guess it is not possible to create any network interfaces by using ip link add ?

# ip
BusyBox v1.36.1 () multi-call binary.

Usage: ip [OPTIONS] address|route|link|tunnel|neigh|rule [ARGS]

OPTIONS := -f[amily] inet|inet6|link | -o[neline]

ip addr add|del IFADDR dev IFACE | show|flush [dev IFACE] [to PREFIX]
ip route list|flush|add|del|change|append|replace|test ROUTE
ip link set IFACE [up|down] [arp on|off] [multicast on|off]
        [promisc on|off] [mtu NUM] [name NAME] [qlen NUM] [address MAC]
        [master IFACE | nomaster] [netns PID]
ip tunnel add|change|del|show [NAME]
        [mode ipip|gre|sit] [remote ADDR] [local ADDR] [ttl TTL]
ip neigh show|flush [to PREFIX] [dev DEV] [nud STATE]
ip rule [list] | add|del SELECTOR ACTION

and it does not show anything like ip link add. I cannot create gre/vxlan tunnel network interfaces as well as linux bridge on it.

Wondering whether adding complete version of iproute2 instead of that in the busybox solves this problem.

lakdif commented 2 months ago

ip link add dev wg0 type wireguard

razuritta commented 2 months ago

ip link add dev wg0 type wireguard

it has following output:

# ip link add dev wg0 type wireguard
ip: RTNETLINK answers: Not supported
wj-xiao commented 2 months ago

Could you please confirm the image version? Cause WireGuard is available from the version v1.1.0.

Or you can update to the latest image and try again.

razuritta commented 2 months ago

Could you please confirm the image version? Cause WireGuard is available from the version v1.1.0.

Or you can update to the latest image and try again.

I see, it has a version 2.0.6 for application, and 1.0.0 for image version. Is it possible to upgrade image version via web or by placing image file to some specific place and then reboot? Or is it a must to upgrade image version by pulling out tf card and flash it directly? :)

wj-xiao commented 2 months ago

Unfortunately, the TF card must be pulled out to upgrade the image. To avoid frequent updates, a stable image version will be released in the future.

razuritta commented 2 months ago

Unfortunately, the TF card must be pulled out to upgrade the image. To avoid frequent updates, a stable image version will be released in the future.

I'm able to add wireguard interface manually on image version 1.2.0. Thank you for your help. And it seems that full version iproute2 is added in version 1.2.0 image.