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

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

    <bug>
          <bug_id>46632</bug_id>
          
          <creation_ts>2023-06-22 21:39:56 +0300</creation_ts>
          <short_desc>Отваливается сеть у виртуальных машин при изменении настроек через alterator-net-iptables</short_desc>
          <delta_ts>2023-06-30 14:08:24 +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>alterator-net-iptables</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="igor">igor.bz</reporter>
          <assigned_to name="Mikhail Efremov">sem</assigned_to>
          <cc>alimektor</cc>
          
          <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>228248</commentid>
    <comment_count>0</comment_count>
    <who name="igor">igor.bz</who>
    <bug_when>2023-06-22 21:39:56 +0300</bug_when>
    <thetext>При применении изменённых значений через брандмауэр (alterator-net-iptables) отваливается сеть у виртуальных машин на базе qemu-kvm с задействованием libvird. Сеть в виртуальных машинах начинает работать вновь только после перезапуска службы libvirtd.
У хоста сеть работает нормально.

Дистрибутив:
NAME=&quot;starter kit&quot;
VERSION=&quot;10&quot;
ID=altlinux
VERSION_ID=10
PRETTY_NAME=&quot;ALT Starterkit 10 (Hypericum)&quot;

---

rpm -q libvirt-daemon

libvirt-daemon-9.3.0-alt1.x86_64

---

rpm -q alterator-net-iptables

alterator-net-iptables-4.19.10-alt1.x86_64

---

Вывод из журнала в процессе применения настроек брандмауэра:
    systemd[1]: Stopping Network Connectivity...
    network[1725202]: Computing interface groups: . 1 interfaces found
    network[1725202]: Processing /etc/net/vlantab: empty.
    network[1725202]: Stopping group 0/virtual (1 interfaces)
    avahi-daemon[1617793]: Withdrawing address record for 127.0.0.1 on lo.
    avahi-daemon[1617793]: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
    avahi-daemon[1617793]: Interface lo.IPv4 no longer relevant for mDNS.
    avahi-daemon[1617793]: Interface lo.IPv6 no longer relevant for mDNS.
    avahi-daemon[1617793]: Leaving mDNS multicast group on interface lo.IPv6 with address ::1.
    avahi-daemon[1617793]: Withdrawing address record for ::1 on lo.
    network[1725202]: Stopping lo:
    network[1725232]: ..
    network[1725202]: OK
    network[1725286]: Stopping iptables for default
    network[1725286]: Flushing the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table
    network[1725286]: Flushing the &quot;FORWARD&quot; chain in the &quot;filter&quot; table
    network[1725286]: Flushing the &quot;INPUT&quot; chain in the &quot;filter&quot; table
    network[1725286]: Flushing the &quot;POSTROUTING&quot; chain in the &quot;nat&quot; table
    network[1725286]: Flushing the &quot;OUTPUT&quot; chain in the &quot;nat&quot; table
    network[1725286]: Flushing the &quot;PREROUTING&quot; chain in the &quot;nat&quot; table
    network[1725286]: Flushing the &quot;POSTROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;OUTPUT&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;FORWARD&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;INPUT&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;PREROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Unloading module ip_conntrack_ftp
    network[1725286]: Setting ACCEPT policy for the &quot;INPUT&quot; chain in the &quot;filter&quot; table
    network[1725286]: Setting ACCEPT policy for the &quot;FORWARD&quot; chain in the &quot;filter&quot; table
    network[1725286]: Setting ACCEPT policy for the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table
    network[1725286]: Stopping ip6tables for default
    network[1725286]: Flushing the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table
    network[1725286]: Flushing the &quot;FORWARD&quot; chain in the &quot;filter&quot; table
    network[1725286]: Flushing the &quot;INPUT&quot; chain in the &quot;filter&quot; table
    network[1725286]: Flushing the &quot;POSTROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;OUTPUT&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;FORWARD&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;INPUT&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Flushing the &quot;PREROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725286]: Unloading module ip_conntrack_ftp
    network[1725286]: Setting ACCEPT policy for the &quot;INPUT&quot; chain in the &quot;filter&quot; table
    network[1725286]: Setting ACCEPT policy for the &quot;FORWARD&quot; chain in the &quot;filter&quot; table
    network[1725286]: Setting ACCEPT policy for the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table
    systemd[1]: network.service: Deactivated successfully.
    systemd[1]: Stopped Network Connectivity.
    systemd[1]: Starting Network Connectivity...
    network[1725451]: Starting ip6tables for default
    network[1725451]: Setting ACCEPT policy for the &quot;INPUT&quot; chain in the &quot;filter&quot; table
    network[1725451]: Setting ACCEPT policy for the &quot;FORWARD&quot; chain in the &quot;filter&quot; table
    network[1725451]: Setting ACCEPT policy for the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table
    network[1725451]: Loading module ip_conntrack_ftp
    network[1725451]: Loading rules for the &quot;PREROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;INPUT&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;FORWARD&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;OUTPUT&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;POSTROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;INPUT&quot; chain in the &quot;filter&quot; table....
    network[1725451]: Loading rules for the &quot;FORWARD&quot; chain in the &quot;filter&quot; table......
    network[1725451]: Loading rules for the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table..
    network[1725451]: Starting iptables for default
    network[1725451]: Setting ACCEPT policy for the &quot;INPUT&quot; chain in the &quot;filter&quot; table
    network[1725451]: Setting ACCEPT policy for the &quot;FORWARD&quot; chain in the &quot;filter&quot; table
    network[1725451]: Setting ACCEPT policy for the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table
    network[1725451]: Loading module ip_conntrack_ftp
    network[1725451]: Loading rules for the &quot;PREROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;INPUT&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;FORWARD&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;OUTPUT&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;POSTROUTING&quot; chain in the &quot;mangle&quot; table
    network[1725451]: Loading rules for the &quot;PREROUTING&quot; chain in the &quot;nat&quot; table
    network[1725451]: Loading rules for the &quot;OUTPUT&quot; chain in the &quot;nat&quot; table
    network[1725451]: Loading rules for the &quot;POSTROUTING&quot; chain in the &quot;nat&quot; table
    network[1725451]: Loading rules for the &quot;INPUT&quot; chain in the &quot;filter&quot; table.......
    network[1725451]: Loading rules for the &quot;FORWARD&quot; chain in the &quot;filter&quot; table.......
    network[1725451]: Loading rules for the &quot;OUTPUT&quot; chain in the &quot;filter&quot; table...
    network[1725434]: Computing interface groups: . 1 interfaces found
    network[1725434]: Starting group 0/virtual (1 interfaces)
    network[1725434]: Starting lo:
    avahi-daemon[1617793]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
    network[1725919]: .
    avahi-daemon[1617793]: New relevant interface lo.IPv4 for mDNS.
    avahi-daemon[1617793]: Registering new address record for 127.0.0.1 on lo.IPv4.
    avahi-daemon[1617793]: Joining mDNS multicast group on interface lo.IPv6 with address ::1.
    avahi-daemon[1617793]: New relevant interface lo.IPv6 for mDNS.
    avahi-daemon[1617793]: Registering new address record for ::1 on lo.*.
    NetworkManager[3012]: &lt;info&gt; [1687458444.8239] device (lo): carrier: link connected
    avahi-daemon[1617793]: Withdrawing address record for 127.0.0.1 on lo.
    avahi-daemon[1617793]: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
    avahi-daemon[1617793]: Interface lo.IPv4 no longer relevant for mDNS.
    network[1725931]: .
    avahi-daemon[1617793]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
    network[1725934]: .
    avahi-daemon[1617793]: New relevant interface lo.IPv4 for mDNS.
    avahi-daemon[1617793]: Registering new address record for 127.0.0.1 on lo.IPv4.
    network[1725942]: .
    network[1725434]: OK
    network[1725434]: Processing /etc/net/vlantab: empty.
    systemd[1]: Started Network Connectivity</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228652</commentid>
    <comment_count>1</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2023-06-30 14:08:24 +0300</bug_when>
    <thetext>Пакет:

-   alterator-net-iptables-4.19.10-alt1

Стенд:

-   ALT Workstation 10.1 с обновлением до текущего P10

Шаги:

1.  Выполнить первоначальную настройку:

    # apt-get install -y alterator-net-iptables virt-manager qemu libvirt libvirt-daemon-driver-storage-disk
    # systemctl enable --now libvirtd &amp;&amp; sleep 5; systemctl status libvirtd --no-pager -l
    # gpasswd -a test vmusers

2.  Скачать любой образ (в моём случае ALT Workstation 10.1).

3.  Включить сеть: Вкладка Виртуальные сети -&gt; выбрать default -&gt; нажать
    треугольник (запустить) -&gt; включить чекбокс Автозапуск: при загрузке
    -&gt; Применить

4.  Создать виртуальную машину.

5.  Проверить сеть в виртуальной машине (ping ya.ru, страница в
    браузере) и командой:

    # virsh net-list --all
     Имя       Состояние   Автозапуск   Постоянный
    ------------------------------------------------
     default   активен     yes          yes

6.  Запустить Центр управления системой → включить режим эксперта →
    Брандмауэр → Перенаправление портов

7.  Добавить правило:

-   Протокол: TCP
-   IP адрес: порт: 777
-   перенаправлять на IP адрес: &lt;текущий_ip&gt; порт: 80

нажать Добавить

8.  Включить чекбокс Включить перенаправление портов
9.  Проверить сеть командой:

    # virsh net-list --all
     Имя       Состояние   Автозапуск   Постоянный
    ------------------------------------------------
     default   активен     yes          yes

10. Проверить сеть в виртуальной машине:

    $ ping -с 3 ya.ru
    $ xbrowser google.com

Ожидаемый результат: присутствует сетевое соединение.

Фактический результат: отсутствует сетевое соединение.

Дополнительно 1: выполнение команды # systemctl restart libvirtd
действительно решает проблему с сетевым соединением.

Дополнительно 2: если сначала выполнять пинг (ping ya.ru), после чего
нажать чекбокс Включить перенаправление портов, то пинг продолжится, но
повторный пинг уже не выполняется.

В Sisyphus не проверялось.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>