Wireguard - クライアントはサーバーに ping を送信できますが、互いに ping を送信することはできません。

Wireguard - クライアントはサーバーに ping を送信できますが、互いに ping を送信することはできません。

3つのノード(サーバー1つと追加のクライアント2つ)があります。

両方のクライアントとサーバーの両方のクライアントでサーバーエンドポイントを正常にpingできます。ただし、両方のクライアントは互いに正常にpingできません。

エンドポイントが正しく送信されているかどうかはわかりません。何を設定するかについての多くの情報が見つかりません。

サーバーにデバッグエラーログが表示されます。

[ 2848.826167] wireguard: wg0: Invalid MAC of handshake, dropping packet from 90.218.41.186:1024

私はどこで間違っている可能性がありますか?


  peers = [
    # For a client configuration, one peer entry for the server will suffice.

    # server
    {
      publicKey = "***************";
      allowedIPs = [ "10.100.0.1"];
      endpoint = "**Server_IP_redacted**:51820"; 
      persistentKeepalive = 25;
    }

    # pineapple
    {
      publicKey = "*************";
      allowedIPs = [ "10.100.0.2" ];
      endpoint = "**Server_IP_redacted**:51820"; 
      persistentKeepalive = 25;
    }
  ];

ベストアンサー1

サーバーの単一ピアを定義し、allowedIps明示的なIPの代わりに適切なサブネットを設定した後、正常に動作し始めました。

peers = [

        # server
        {
          publicKey = "**********";
          allowedIPs = [ "10.100.0.0/24"];
          endpoint = "**Server_IP_redacted**:51820"; 
          persistentKeepalive = 25;
        }

  ];

サーバーでもNATを有効にする必要があると思います。

  networking.nat.enable = true;

おすすめ記事