<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>42275</bug_id>
          
          <creation_ts>2022-03-28 14:19:55 +0300</creation_ts>
          <short_desc>Некорректный импорт конфиг файла wireguard</short_desc>
          <delta_ts>2022-04-06 18:47:20 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Branch p10</product>
          <component>NetworkManager</component>
          <version>не указана</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikita Obukhov">nickf</reporter>
          <assigned_to name="Mikhail Efremov">sem</assigned_to>
          
          
          <qa_contact name="qa-p10@altlinux.org">qa-p10</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>208972</commentid>
    <comment_count>0</comment_count>
    <who name="Nikita Obukhov">nickf</who>
    <bug_when>2022-03-28 14:19:55 +0300</bug_when>
    <thetext>Клиент:
faafd7d37c4e4fd4e5131144da2b6695  alt-kworkstation-10.0-RC2_20220302-install-x86_64.iso

Сервер wireguard разворачивал на обновленном до p10 образе:
3cc064c3410e8763c2b7bbd8d0af4936  alt-server-10.0-x86_64.iso

При импорте конфиг файла wireguard импортируется неправильный адрес.
Шаги воспроизведения:
На сервере:
Установить пакеты wireguard:
# apt-get install wireguard-tools wireguard-tools-wg-quick

Создать директорию для WireGuard и сгенерировать ключи для клиента и сервера:
# wg genkey | tee server-private.key | wg pubkey &gt; server-public.key
# wg genkey | tee client-private.key | wg pubkey &gt; client-public.key
# chmod 600 ./*-private.key

Создать конфиг файл /etc/wireguard/wg0-server.conf со следующим содержимым:
[Interface]
Address = 10.0.0.1/24
PrivateKey = SERVER_PRIVATE_KEY
ListenPort = 39548
[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 10.0.0.2/32

Запустить сервис wireguard:
# systemctl enable --now wg-quick@wg0-server

На клиенте:
Создать файл конфигурации wg0-client.conf:
[Interface]
Address = 10.0.0.2/24
PrivateKey = CLIENT_PRIVATE_KEY
[Peer]
PublicKey = SERVER_PUBLIC_KEY
AllowedIPs = 0.0.0.0/0
Endpoint = SERVER_IP:39548
PersistentKeepalive = 20

Перейти в Параметры системы-&gt;Соединения . Нажать Добавить новое соединение. В открывшемся окне выбрать Импортировать VPN-соединение... и выбрать созданный ранее файл.

Ожидаемый результат:
Корректный импорт файла конфигурации.
Реальный результат:
Во вкладке IPv4 в качестве адреса указан 10.0.0.0. Подключиться к этому соединению можно. Но пинг не идет.

Если вручную заменить адрес на 10.0.0.2 все работает корректно. Пинг между ВМ работает.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209249</commentid>
    <comment_count>1</comment_count>
    <who name="Mikhail Efremov">sem</who>
    <bug_when>2022-04-06 18:47:20 +0300</bug_when>
    <thetext>Если импортировать nmcli правильно создается?

nmcli connection import type wireguard file wg0-client.conf</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>