我尝试过的步骤

  • 我正在尝试在Raspberry pi上设置Wireguard客户端

  • 这是二手的配置
    # /etc/wireguard/wg0-client.conf
    [Interface]
    Address = 10.10.0.4/32
    Address = fd86:ea04:1111::4/128
    SaveConfig = true
    PrivateKey = CLIENT-PRIVATE-KEY
    DNS = 8.8.8.8
    
    [Peer]
    PublicKey = SERVER-PUBLIC-KEY
    Endpoint = SERVER-PUBLIC-IP:PORT
    AllowedIPs = 0.0.0.0/0, ::/0
    
  • 设置Wireguard配置后,我运行sudo wg-quick up wg0-client,它像
  • 一样失败
    pi@raspberrypi:~ $ sudo wg-quick up wg0-client
    [#] ip link add wg0-client type wireguard
    RTNETLINK answers: Operation not supported
    Unable to access interface: Protocol not supported
    [#] ip link delete dev wg0-client
    Cannot find device "wg0-client"
    

    操作系统和硬件环境
    /etc/os-release 信息
    pi@raspberrypi:~ $ cat /etc/os-release
    PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    ID=raspbian
    ID_LIKE=debian
    HOME_URL="http://www.raspbian.org/"
    SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
    BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
    
    /sys/firmware/devicetree/base/model 了解硬件信息
    Raspberry Pi 3 Model B Rev 1.2
    

    最佳答案

    前几天,我为我的Pi-2解决了这一问题,方法是删除Wireguard将内核更新/升级到最新版本,安装内核头文件,然后重新安装Wireguard。在那之后像魅力一样工作。
    但是,您可能只需要内核头文件。
    您可以尝试先进行“sudo apt-get install raspberrypi-kernel-headers”。
    我上线了:
    Linux raspberrypi 4.19.118-v7 +#1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux

    关于linux - 在Raspberry Pi上尝试Wireguard失败,出现 “RTNETLINK answers: Operation not supported”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/62629819/

    10-10 10:10