tag:blogger.com,1999:blog-76221560396635956752024-03-18T17:42:39.896+03:00Блог айтишника красноглазикаВсе об ITAdmi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.comBlogger1043125tag:blogger.com,1999:blog-7622156039663595675.post-56389076901768611612024-03-13T11:17:00.000+03:002024-03-13T11:17:00.404+03:00Sniffnet - мониторинг трафика <p> Sniffnet</p><div align="center" dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px;"><a href="https://github.com/GyulyVGC/sniffnet/blob/main/resources/repository/pages/overview_page.png?raw=true" rel="noopener noreferrer" style="background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;" target="_blank"><img alt="" src="https://github.com/GyulyVGC/sniffnet/raw/main/resources/repository/pages/overview_page.png?raw=true" style="background-color: var(--bgColor-default, var(--color-canvas-default)); border-style: none; box-sizing: content-box; max-width: 100%;" width="100%" /></a></div><div align="center" dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px;"><a href="https://github.com/GyulyVGC/sniffnet/blob/main/resources/repository/pages/inspect_page.png?raw=true" rel="noopener noreferrer" style="background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;" target="_blank"><img alt="" src="https://github.com/GyulyVGC/sniffnet/raw/main/resources/repository/pages/inspect_page.png?raw=true" style="background-color: var(--bgColor-default, var(--color-canvas-default)); border-style: none; box-sizing: content-box; max-width: 100%;" width="49%" /></a> <a href="https://github.com/GyulyVGC/sniffnet/blob/main/resources/repository/pages/notifications_page.png?raw=true" rel="noopener noreferrer" style="background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;" target="_blank"><img alt="" src="https://github.com/GyulyVGC/sniffnet/raw/main/resources/repository/pages/notifications_page.png?raw=true" style="background-color: var(--bgColor-default, var(--color-canvas-default)); border-style: none; box-sizing: content-box; max-width: 100%;" width="49%" /></a></div><p>Удобный мониторинг интернет-трафика </p><p>Работает в Windows, GNU/Linux, Mac</p><p>Особенности</p><p>💻 выбирайте сетевой адаптер вашего компьютера для проверки</p><p>🏷️ выбирайте набор фильтров для применения к наблюдаемому трафику</p><p>📖 просмотр общей статистики о вашем интернет-трафике</p><p>📈 просмотр графиков интенсивности трафика в реальном времени (байты и пакеты в секунду, входящие и исходящие)</p><p>🌐 получайте подробную информацию о доменных именах и сетевых провайдерах узлов, с которыми вы обмениваетесь трафиком</p><p>🏠 идентифицируйте соединения в вашей локальной сети</p><p>🌍 получайте информацию о стране удаленных узлов (IP-геолокация)</p><p>⭐️ сохраняйте любимые сетевые узлы</p><p>🔉 настройка пользовательских уведомлений для информирования о наступлении определенных сетевых событий</p><p>🎨 выбирайте наиболее подходящий для вас стиль из 12 доступных тем, а также поддерживайте собственные темы</p><p>🕵️ просматривайте каждое сетевое соединение в режиме реального времени</p><p>📁 сохраняйте полные текстовые отчеты с подробной информацией по каждому сетевому соединению:</p><p>IP-адреса источника и назначения</p><p>порты источника и назначения</p><p>используемые протоколы</p><p>количество переданных пакетов и байтов</p><p>начальная и конечная отметка времени обмена информацией</p><p>... и многое другое!</p><p><br /></p><p>https://github.com/GyulyVGC/sniffnet</p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-81563942540460217712024-03-07T14:10:00.002+03:002024-03-07T14:10:14.235+03:00Что такое EOIP и как его настроить в Mikrotik<p><span style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; font-size: 16px; text-align: justify; text-indent: 30px;">По сути, EoIP является L2-каналом, который строится поверх L3-среды. Главное условие — адреса обеих сторон должны быть известны. Это может быть просто два маршрутизируемых IP или VPN (EOIP не обеспечивает шифрование). EoIP — штука пропиетарная (хотя попытки запилить поддержку этого типа тоннелей в LINUX/BSD предпринимались, но, в лучшем случае, это userspace-софт, а тут мы имеем ядерную (а значит, очень дешевую в плане ресурсов) технологию, позволяющую прокидывать действительно прозрачный L2.</span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; text-align: justify; text-indent: 30px;"><span style="font-size: 16px;"><br />Суть проста — два микротика связываются между собой, идентифицируясь по айпишникам (адреса обеих точек должны быть статическими и доступными друг для друга) и т.н. tunnel-id — идентификатору тоннеля.<br /><br />После создания eoip-интерфейс объединяется с другим l2-интерфейсом при помощи моста. Т.о. получаем возможность прокидывать L2-трафик через всяческие помехи вроде других операторов, НАТы (тут нужна будет инкапсуляция в PPTP/L2TP) или просто провести несколько вланов через один l2-канал.<br /><br />Главное, что нужно помнить:</span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; margin-left: 40px; text-align: justify; text-indent: 30px;"><span style="font-size: 18px;"><strong>1. EoIP не работает через NAT. IP обеих сторон должны быть маршрутизируемы</strong></span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; margin-left: 40px; text-align: justify; text-indent: 30px;"><span style="font-size: 18px;"><strong>2. EoIP использует GRE в качестве транспорта, так что нужно следить за MTU.</strong></span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; margin-left: 40px; text-align: justify; text-indent: 30px;"><span style="font-size: 18px;"><strong>3. Каждому l2-каналу, который вы хотите пробросить с помощью eoip, должен соответствовать свой тоннель. Один влан — один eoip-интерфейс.</strong></span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; margin-left: 40px; text-align: justify; text-indent: 30px;"><span style="font-size: 18px;"><strong>4. Tunnel-id должен совпадать на обоих концах тоннеля и быть уникальным в рамках одного устройства (использование двух eoip-тоннелей с один tunnel—id, но разными соседними точками недопустимо).</strong></span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; text-align: justify; text-indent: 30px;"><br /><span style="font-size: 16px;">Сначала мы создаем, собственно, сам тоннель.<br />Потом создаем бридж, через который будет ходить наш трафик. Один бридж — один влан — один тоннель.<br />Ну и добавляем в этот бридж сами интерфейсы — eoip, и второй l2-интерфейс, который, собственно, нам нужно прокинуть через l3.<br /><br />Аналогичные действия производим на другой стороне.<br />После этого EoIP-туннель можно считать работающим.</span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; text-align: justify; text-indent: 30px;"><span style="font-size: 16px;"><br /></span></p><p style="background-color: black; color: #cccccc; font-family: Tahoma, Geneva, sans-serif; text-align: justify; text-indent: 30px;"></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="366" src="https://www.youtube.com/embed/W1_jvPTIabM" width="440" youtube-src-id="W1_jvPTIabM"></iframe></div><br /><span style="font-size: 16px;"><br /></span><p></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-68028701935494177102024-03-04T15:44:00.001+03:002024-03-04T15:44:05.492+03:00Как настроить тегирование VLAN в Linux?<p> </p><div itemprop="articleBody" style="border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; text-align: center;"><h2 id="header-3" style="border: 0px; box-sizing: border-box; font-size: 2em; line-height: 1.2; margin: -60px 0px 15px; padding: 80px 0px 0px; text-align: left;"><span class="caps" style="border: 0px; box-sizing: border-box; margin: 0px; padding: 0px;">VLAN</span> Tagging VS Присвоение нескольких IP-адресов одной сетевой карте</h2><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>-тегирование – это не совсем то же самое, что присвоение нескольких IP-адресов одному сетевому интерфейсу.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>-тегирование – это способ разделения одной сети на несколько виртуальных сетей, каждая из которых имеет свой собственный широковещательный домен. Для этого к каждому кадру Ethernet добавляется метка <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, которая идентифицирует <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, к которой принадлежит кадр. Тегирование <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> является технологией второго уровня, то есть работает на том же уровне, что и протокол Ethernet.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Назначение нескольких IP-адресов одному сетевому интерфейсу, напротив, является технологией третьего уровня. Для этого сетевой интерфейс конфигурируется с несколькими IP-адресами, каждый из которых принадлежит к отдельной подсети. Это позволяет интерфейсу взаимодействовать с устройствами в нескольких сетях.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Эти две технологии часто используются вместе для создания безопасной и гибкой сетевой среды. Например, компания может использовать <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> для разделения сети на различные отделы, а затем назначить несколько IP-адресов каждому сетевому интерфейсу, чтобы устройства могли взаимодействовать с несколькими отделами.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Вот таблица, в которой кратко описаны основные различия между тегами <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> и назначением нескольких IP-адресов одному сетевому интерфейсу:</p><a href="https://itshaman.ru/images/12028_1600.webp" rel="gb_imageset[]" style="border: 0px; box-sizing: border-box; color: #501445; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;"><picture style="box-sizing: border-box; position: relative;"><source srcset="//itshaman.ru/images/12028_800.webp 1x, //itshaman.ru/images/12028_1600.webp 2x" style="box-sizing: border-box;"></source><img alt="" height="506" loading="lazy" src="https://itshaman.ru/images/12028_800.webp" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 10px auto; max-width: 100%; padding: 0px;" width="800" /></picture></a><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">После выполнения этих шагов модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> должен быть загружен и доступен для настройки <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> в вашей системе Linux. При необходимости можно приступить к созданию подинтерфейсов <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> и настройке тегов <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 2 – Редактирование файла конфигурации Netplan</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Файлы конфигурации Netplan обычно располагаются в каталоге <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">/etc/netplan/</code> и имеют расширение <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">.yaml</code>.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Возможно, у вас уже есть файл конфигурации. Если нет, то его можно создать. Используйте текстовый редактор, например <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">nano</code> или <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">vim</code>, для редактирования файла конфигурации:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo nano /etc/netplan/01-netcfg.yaml</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Замените <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">01-netcfg.yaml</code> на свой файл конфигурации.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 3 – Определение конфигурации <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">В конфигурационном файле Netplan определите интерфейс <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, указав его имя, родительский интерфейс (физический интерфейс, с которым будет связана <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>) и <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> ID.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Приведем пример конфигурации <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">YAML</span>:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">network:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: no
addresses:
- 192.168.1.40/24
routes:
- to: default
via: 192.168.1.101
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
vlans:
vlan10:
id: 10
link: ens18
addresses: [192.168.10.2/24]</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">В приведенном конфигурационном файле замените сетевые параметры, соответствующие вашей собственной конфигурации.</p><ul style="border: 0px; box-sizing: border-box; line-height: 1.5; list-style: none; margin: 0px 0px 20px; padding: 0px 0px 0px 50px; text-align: left;"><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ens18</code>: Замените на имя физического сетевого интерфейса.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">vlan10</code>: Замените имя <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">id: 10</code>: Замените на желаемый идентификатор <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">link: ens18</code>: Укажите физический интерфейс, с которым будет ассоциирована <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">addresses</code>: Задайте IP-адрес и маску подсети для <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</li></ul><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Вы также можете определить несколько <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, как показано в следующей конфигурации. Только убедитесь, что вы использовали уникальное имя и IP-адрес для каждой <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</p><a href="https://itshaman.ru/images/12029_1600.webp" rel="gb_imageset[]" style="border: 0px; box-sizing: border-box; color: #501445; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;"><picture style="box-sizing: border-box; position: relative;"><source srcset="//itshaman.ru/images/12029_800.webp 1x, //itshaman.ru/images/12029_1600.webp 2x" style="box-sizing: border-box;"></source><img alt="" height="434" loading="lazy" src="https://itshaman.ru/images/12029_800.webp" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 10px auto; max-width: 100%; padding: 0px;" width="800" /></picture></a><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Важно:</span></p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Правильный отступ строк в конфигурационных файлах Netplan <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">YAML</span> очень важен для удобства чтения и корректности. В <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">YAML</span> используются пробелы для представления структуры данных, поэтому последовательный и четкий отступ крайне важен.</p><ul style="border: 0px; box-sizing: border-box; line-height: 1.5; list-style: none; margin: 0px 0px 20px; padding: 0px 0px 0px 50px; text-align: left;"><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;">Используйте пробелы (не табуляции) для отступа.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;">Сохраняйте последовательный интервал во всей конфигурации.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;">Оставляйте пробел после двоеточия, чтобы отделить ключи от значений или блоков.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;">Правильный отступ улучшает читаемость, минимизирует ошибки и облегчает управление файлами конфигурации сети.</li></ul><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 4 – Применение конфигурации</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Сохраните изменения в конфигурационном файле Netplan и выйдите из текстового редактора. Затем примените конфигурацию с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">netplan</code>:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo netplan apply</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Эта команда применит новую конфигурацию сети, включая настройку <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 5 – Проверка конфигурации</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Убедиться в том, что интерфейс <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> создан и работает правильно, можно с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ip</code>:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">ip addr show vlan10
ip link show vlan10</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Замените <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">vlan10</code> на имя интерфейса <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>. Эти команды должны отобразить информацию об интерфейсе <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> и его IP-конфигурации.</p><a href="https://itshaman.ru/images/12030_1600.webp" rel="gb_imageset[]" style="border: 0px; box-sizing: border-box; color: #501445; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;"><picture style="box-sizing: border-box; position: relative;"><source srcset="//itshaman.ru/images/12030_800.webp 1x, //itshaman.ru/images/12030_1600.webp 2x" style="box-sizing: border-box;"></source><img alt="" height="197" loading="lazy" src="https://itshaman.ru/images/12030_800.webp" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 10px auto; max-width: 100%; padding: 0px;" width="800" /></picture></a><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Вот и все! Вы настроили тегирование <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> с помощью Netplan. Обязательно адаптируйте конфигурацию к конкретной сетевой настройке, включая идентификатор <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, IP-адрес и имя физического интерфейса, если это необходимо.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 6 – Удаление <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Чтобы удалить интерфейс <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, просто удалите соответствующий раздел для vlan в конфигурационном файле Netplan.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Перед внесением изменений рекомендуется сделать резервную копию конфигурационного файла Netplan. Таким образом, если что-то пойдет не так, вы сможете легко вернуться к исходной конфигурации.</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo cp /etc/netplan/01-netcfg.yaml /etc/netplan/01-netcfg.yaml.backup</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Откройте файл конфигурации Netplan в текстовом редакторе:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo nano /etc/netplan/01-netcfg.yaml</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Найдите раздел для <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, который вы хотите удалить. Это будет подраздел под <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">vlans:</code> и будет выглядеть примерно так:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">vlans:
vlan10:
id: 10
link: eth0
addresses: [192.168.10.2/24]</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Удалите всю секцию для <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>. Сохраните и закройте файл.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Примените изменения, выполнив:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo netplan apply</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Убедитесь, что <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> успешно удалена, проверив сетевые интерфейсы:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">ip a</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Интерфейс <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> (например, vlan10) больше не должен быть в списке.</p><h2 id="header-4" style="border: 0px; box-sizing: border-box; font-size: 2em; line-height: 1.2; margin: -60px 0px 15px; padding: 80px 0px 0px; text-align: left;">2. Настройка тегов <span class="caps" style="border: 0px; box-sizing: border-box; margin: 0px; padding: 0px;">VLAN</span> с помощью команды nmcli</h2><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Чтобы настроить теги <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> с помощью <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">nmcli</code> (командно-строчного интерфейса NetworkManager) в системе Linux, выполните следующие шаги:</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 1 – Проверка загрузки модуля <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Для проверки загрузки модуля <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> (<code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">8021q</code>) в Linux можно воспользоваться командой <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">lsmod</code>, которая выводит список загруженных модулей ядра. Вот как проверить, загружен ли модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>:</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Откройте <a href="https://itshaman.ru/category/terminal/" style="border: 0px; box-sizing: border-box; color: #501445; font-size: 17.6px; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;">терминал</a> и выполните следующую команду:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">lsmod | grep 8021q</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Если модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> загружен, вы увидите вывод, включающий «8021q». Если ничего не выводится, значит, модуль не загружен.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Если вы обнаружили, что модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> не загружен, вы можете загрузить его вручную с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">modprobe</code>:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo modprobe 8021q</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">После выполнения этой команды можно еще раз проверить его состояние с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">lsmod | grep 8021q</code>. Если модуль загружен, то в выводе появится его список.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Чтобы модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> (<code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">8021q</code>) постоянно загружался при загрузке системы в Linux-системе, выполните следующие действия:</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Определите, какой конфигурационный файл используется для указания модулей для автоматической загрузки при загрузке системы. Расположение этого файла зависит от дистрибутива Linux.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Для Red Hat/CentOS</span>:</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Обычно файл находится в каталоге <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">/etc/modules-load.d/modules.conf</code>.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Для Ubuntu/Debian</span>:</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Создайте собственный файл <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">.conf</code> в каталоге <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">/etc/modules-load.d/</code>.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Откройте файл конфигурации с помощью текстового редактора с правами администратора (например, <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">sudo nano</code> или <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">sudo vi</code> ).</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">В файле конфигурации добавьте строку для указания модуля <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> ( <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">8021q</code> ), который должен загружаться при загрузке. Например:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">8021q</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Сохраните файл после добавления этой записи.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Применить конфигурацию:</span></p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">После редактирования конфигурационного файла может потребоваться применить внесенные изменения. В некоторых системах это происходит автоматически во время загрузки. Однако можно применить изменения вручную с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">systemctl</code>:</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Для Red Hat/CentOS</span>:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo systemctl restart systemd-modules-load</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Для Ubuntu/Debian</span>:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo systemctl restart systemd-modules-load.service</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Проверка загрузки модуля:</span></p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Чтобы убедиться, что модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> загружен при загрузке, можно проверить его состояние с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">lsmod</code> или проверить системные журналы на наличие соответствующих сообщений. Если модуль отображается в списке, это означает, что он успешно загрузился в процессе загрузки.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Выполнив эти шаги и настроив модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> на постоянную загрузку, вы обеспечите автоматическую загрузку модуля при каждой загрузке системы, и вам не придется загружать его вручную.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 2 – Проверка службы NetworkManager</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Убедитесь, что NetworkManager установлен и работает в вашей системе. Проверить состояние NetworkManager можно с помощью следующей команды:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">systemctl status NetworkManager</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Если он не установлен или не работает, его можно установить и запустить с помощью менеджера пакетов вашего дистрибутива (например, <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">apt</code> в Debian/Ubuntu или <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">yum</code> в CentOS/RHEL).</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 3 – Определение родительского интерфейса</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Определите физический сетевой интерфейс, который будет использоваться в качестве базового для вашей <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>. Список всех доступных сетевых интерфейсов можно получить с помощью следующей команды:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">nmcli device status</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Пример вывода:</span></p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">DEVICE TYPE STATE CONNECTION
ens18 ethernet connected Wired connection 1
lo loopback unmanaged --</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Найдите нужный интерфейс, например <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ens18</code>.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 4 – Создание подключения <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Следующим шагом будет создание интерфейса <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>. Для данного примера предположим, что вы хотите создать <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> с ID 10 на <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">eth0</code>.</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo nmcli con add type vlan con-name vlan10 ifname vlan10 dev ens18 id 10</pre><ul style="border: 0px; box-sizing: border-box; line-height: 1.5; list-style: none; margin: 0px 0px 20px; padding: 0px 0px 0px 50px; text-align: left;"><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">con-name vlan10</code> – имя, которое вы даете этому соединению.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ifname vlan10</code> – имя интерфейса <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">dev ens18</code> – родительский интерфейс.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">id 10</code> – ID <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</li></ul><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 5 – Назначение IP-конфигурации интерфейсу <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Теперь назначьте IP-адрес, шлюз и <a href="https://itshaman.ru/category/dns/" style="border: 0px; box-sizing: border-box; color: #501445; font-size: 17.6px; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;"><span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">DNS</span></a> интерфейсу <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Например:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo nmcli connection modify vlan10 ipv4.addresses 192.168.10.2/24
sudo nmcli connection modify vlan10 ipv4.gateway 192.168.10.1
sudo nmcli connection modify vlan10 ipv4.dns 8.8.8.8
sudo nmcli connection modify vlan10 ipv4.method manual</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">В приведенных выше командах замените сетевые настройки на свои.</p><ul style="border: 0px; box-sizing: border-box; line-height: 1.5; list-style: none; margin: 0px 0px 20px; padding: 0px 0px 0px 50px; text-align: left;"><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;">Замените <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">192.168.10.2/24</code> на желаемый IP-адрес и подсеть.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;">Замените <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">192.168.10.1</code> на IP-адрес шлюза.</li><li style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 5px 5px; padding: 0px; position: relative;"><code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">8.8.8.8</code> – пример <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">DNS</span>-сервера (публичный <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">DNS</span> Google).</li></ul><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 6 – Активация соединения</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Активируйте <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>-соединение с помощью следующей команды:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo nmcli connection up vlan10</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Замените <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">VLAN10</code> на имя вашего <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>-соединения.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 7 – Проверка конфигурации</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Для проверки конфигурации можно использовать команду <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">nmcli</code>:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">nmcli connection show vlan10</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Эта команда отобразит подробную информацию о <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>-соединении, включая его состояние и настроенные свойства.</p><a href="https://itshaman.ru/images/12031_1600.webp" rel="gb_imageset[]" style="border: 0px; box-sizing: border-box; color: #501445; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;"><picture style="box-sizing: border-box; position: relative;"><source srcset="//itshaman.ru/images/12031_800.webp 1x, //itshaman.ru/images/12031_1600.webp 2x" style="box-sizing: border-box;"></source><img alt="" height="434" loading="lazy" src="https://itshaman.ru/images/12031_800.webp" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 10px auto; max-width: 100%; padding: 0px;" width="800" /></picture></a><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 8 – Изменение/удаление <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Вы можете изменить настройки с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">nmcli con modify</code>. Для удаления <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>. например, vlan10, команда будет выглядеть так:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo nmcli con delete vlan10</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Вот и все! Вы настроили маркировку <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">nmcli</code> в своей системе Linux. Обязательно адаптируйте конфигурацию к конкретной настройке сети и требованиям, включая IP-адреса, шлюз и настройки <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">DNS</span>.</p><h2 id="header-5" style="border: 0px; box-sizing: border-box; font-size: 2em; line-height: 1.2; margin: -60px 0px 15px; padding: 80px 0px 0px; text-align: left;">3. Настройка тегирования <span class="caps" style="border: 0px; box-sizing: border-box; margin: 0px; padding: 0px;">VLAN</span> с помощью команды ip в Linux</h2><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 1. Проверьте, загружен ли модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Чтобы убедиться, что модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> (802.1Q) загружен в системе Linux, выполните следующие действия:</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Для проверки того, загружен ли уже модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, можно воспользоваться командой <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">lsmod</code>, которая выводит список загруженных модулей ядра. Откройте терминал и выполните:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">lsmod | grep 8021q</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Пример вывода:</span></p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">8021q 45056 0
garp 20480 1 8021q
mrp 20480 1 8021q</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Если в выводе присутствует «8021q», значит, модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> уже загружен.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Если команда <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">lsmod</code> не отображает модуль 802.1Q, его можно загрузить вручную с помощью команды <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">modprobe</code>. Откройте терминал и выполните:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo modprobe 8021q</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Эта команда загрузит модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> в ядро. Если вы не увидите никаких сообщений об ошибках, значит, модуль успешно загружен.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Чтобы модуль <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> загружался автоматически при загрузке, вы можете добавить его в файл <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">/etc/modules</code> или создать конфигурационный файл в каталоге <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">/etc/modules-load.d/</code>. Например, чтобы добавить его в <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">/etc/modules</code>, выполните:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">echo '8021q' | sudo tee -a /etc/modules</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Это добавит «<code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">8021q</code>« в список модулей, которые автоматически загружаются при старте системы.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 2 – Проверка имен сетевых интерфейсов</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Перед настройкой тегов <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> необходимо узнать имена сетевых интерфейсов.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Для получения списка доступных сетевых интерфейсов можно воспользоваться командами <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ip link show</code> или <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ifconfig</code>. Обычно эти интерфейсы имеют имена типа <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">enp0sX</code> или, <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ensX</code> или, <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ethX</code>.</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">ip link show</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;"><span style="border: 0px; box-sizing: border-box; font-size: 17.6px; font-weight: 700; margin: 0px; padding: 0px;">Пример вывода:</span></p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">1: lo:<LOOPBACK,UP,LOWER_UP>mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens18:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 6e:26:0b:8e:33:8c brd ff:ff:ff:ff:ff:ff
altname enp0s18</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Как видно из приведенного выше вывода, имеется один сетевой интерфейс с именем <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ens18</code>.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 3 – Создание подинтерфейсов <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Для создания подинтерфейсов <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> для физического сетевого интерфейса используйте команду <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ip</code>. Замените имя физического интерфейса (например, <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ens18</code> ) и желаемый <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> ID.</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo ip link add link ens18 name vlan10 type vlan id 10
sudo ip link add link ens18 name vlan20 type vlan id 20</pre><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 4 – Настройка IP-адресов</h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Назначьте IP-адреса субинтерфейсам <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo ip addr add 192.168.10.2/24 dev vlan10
sudo ip addr add 192.168.20.2/24 dev vlan20</pre><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 5 – Включить интерфейсы <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">sudo ip link set dev vlan10 up
sudo ip link set dev vlan20 up</pre><a href="https://itshaman.ru/images/12032_1600.webp" rel="gb_imageset[]" style="border: 0px; box-sizing: border-box; color: #501445; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;"><picture style="box-sizing: border-box; position: relative;"><source srcset="//itshaman.ru/images/12032_800.webp 1x, //itshaman.ru/images/12032_1600.webp 2x" style="box-sizing: border-box;"></source><img alt="" height="434" loading="lazy" src="https://itshaman.ru/images/12032_800.webp" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 10px auto; max-width: 100%; padding: 0px;" width="800" /></picture></a><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Таким образом, вы можете настроить столько <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>, сколько необходимо для вашей установки.</p><h3 style="border: 0px; box-sizing: border-box; font-size: 1.4em; margin: 0px 0px 15px; padding: 10px 0px 0px; text-align: left;">Шаг 6 – Проверка IP-адресов <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 22.4px; margin: 0px; padding: 0px;">VLAN</span></h3><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Используйте команду <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ip</code> для проверки правильности настройки IP-адресов для <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>.</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">ip a
1: lo:<LOOPBACK,UP,LOWER_UP>mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens18:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 6e:26:0b:8e:33:8c brd ff:ff:ff:ff:ff:ff
altname enp0s18
inet 192.168.1.40/24 brd 192.168.1.255 scope global noprefixroute ens18
valid_lft forever preferred_lft forever
inet6 fe80::bfcf:b9d3:60de:af1b/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: vlan10@ens18:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 6e:26:0b:8e:33:8c brd ff:ff:ff:ff:ff:ff
inet 192.168.10.2/24 scope global ens18.10
valid_lft forever preferred_lft forever
inet6 fe80::6c26:bff:fe8e:338c/64 scope link
valid_lft forever preferred_lft forever
4: vlan20@ens18:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 6e:26:0b:8e:33:8c brd ff:ff:ff:ff:ff:ff
inet 192.168.20.2/24 scope global ens18.20
valid_lft forever preferred_lft forever
inet6 fe80::6c26:bff:fe8e:338c/64 scope link
valid_lft forever preferred_lft forever</pre><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Как видно из приведенного выше результата, я создал две <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>: <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">vlan10</code> и <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">vlan20</code> с IP-адресами <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">192.168.10.2/24</code> и <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">192.168.20.2/24</code> соответственно.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Также можно использовать команду <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">ip addr show</code> для просмотра IP-адреса только определенной <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>. Например, чтобы показать IP-адрес <code style="background: rgb(245, 245, 245); border-radius: 3px; border: 0px; box-sizing: border-box; color: black; display: inline; font-family: inherit; font-size: 1em; margin: 0px; padding: 3px; text-wrap: nowrap;">vlan10</code>, выполните команду:</p><pre style="background: rgb(245, 245, 245); border-bottom-color: rgba(0, 0, 0, 0.1); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-radius: 5px; border-right-color: rgba(0, 0, 0, 0.1); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.9em; line-height: 1.4; margin-bottom: 17px; margin-top: 5px; overflow-x: auto; padding: 10px 0px 10px 15px; text-align: left;">ip addr show vlan10
3: vlan10@ens18:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 6e:26:0b:8e:33:8c brd ff:ff:ff:ff:ff:ff
inet 192.168.10.2/24 brd 192.168.10.255 scope global noprefixroute ens18.10
valid_lft forever preferred_lft forever
inet6 fe80::6c26:bff:fe8e:338c/64 scope link
valid_lft forever preferred_lft forever</pre><a href="https://itshaman.ru/images/12033_1600.webp" rel="gb_imageset[]" style="border: 0px; box-sizing: border-box; color: #501445; margin: 0px; padding: 0px; position: relative; text-decoration-color: black;"><picture style="box-sizing: border-box; position: relative;"><source srcset="//itshaman.ru/images/12033_800.webp 1x, //itshaman.ru/images/12033_1600.webp 2x" style="box-sizing: border-box;"></source><img alt="" height="434" loading="lazy" src="https://itshaman.ru/images/12033_800.webp" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 10px auto; max-width: 100%; padding: 0px;" width="800" /></picture></a><h2 id="header-6" style="border: 0px; box-sizing: border-box; font-size: 2em; line-height: 1.2; margin: -60px 0px 15px; padding: 80px 0px 0px; text-align: left;">Заключение</h2><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">В данном руководстве мы рассмотрели три способа настройки тегов <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> в операционных системах Linux.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">В сетевых технологиях Linux теги <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span> – это полезная техника, которая позволяет создавать изолированные виртуальные сети в рамках одной физической сети. Такое разделение повышает безопасность, упрощает управление сетью и увеличивает общую эффективность сети.</p><p style="border: 0px; box-sizing: border-box; font-size: 1.1em; line-height: 1.5; margin: 0px 0px 20px; padding: 0px; text-align: left;">Независимо от того, управляете ли вы домашней сетью или сложной корпоративной средой, понимание и внедрение <span class="caps" style="border: 0px; box-sizing: border-box; font-size: 17.6px; margin: 0px; padding: 0px;">VLAN</span>-тегов в Linux позволяет настроить сеть в соответствии с вашими специфическими потребностями, повышая функциональность и безопасность.</p><div><br /></div></div><div itemscope="" itemtype="https://schema.org/FAQPage" style="border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; text-align: center;"></div>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-81456261351617258192024-02-29T16:22:00.001+03:002024-02-29T16:22:17.339+03:00MikroTik Bonding<p> <span style="background-color: #f4f4f4; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px;">Про</span><span style="background-color: #f4f4f4; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px;"> </span><strong style="box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px;">Bonding интерфейсы</strong><span style="background-color: #f4f4f4; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px;"> </span><span style="background-color: #f4f4f4; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px;">документацию на английском языке вы можете почитать перейдя по этой</span><span style="background-color: #f4f4f4; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px;"> </span><a href="https://help.mikrotik.com/docs/display/ROS/Bonding" rel="noreferrer noopener" style="box-sizing: inherit; color: #d39844; font-family: Poppins, sans-serif; font-size: 16px;" target="_blank">ссылке</a><span style="background-color: #f4f4f4; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px;">. Но для тех кому легче читать на русском языке я подготовил такую статью.</span></p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Bonding</strong> — это технология, которая позволяет объединять несколько физических интерфейсов в один виртуальный. В зависимости от режима бондинга эта технология может расширить пропускную способность канала используя балансировку трафика, или усилить отказоустойчивость за счет резервирования линков.</p><h2 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 42px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="Sozdanie_Bondong_interfejsa" style="box-sizing: inherit;">Создание Bondong интерфейса</span></h2><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Чтобы создать <strong style="box-sizing: inherit;">Bondong интерфейс</strong>, выберите пункт меню «<strong style="box-sizing: inherit;">Interfaces</strong>» и в открывшемся окне нажмите кнопку «<strong style="box-sizing: inherit;">+</strong>«, а затем выберите «<strong style="box-sizing: inherit;">Bonding</strong>«:</p><figure class="wp-block-image size-full" style="background-color: #f4f4f4; box-sizing: inherit; color: #9090a0; font-family: Poppins, sans-serif; font-size: 16px; margin: 2em 0px;"><img alt="" class="wp-image-2663" decoding="async" fetchpriority="high" height="682" sizes="(max-width: 887px) 100vw, 887px" src="https://sysadminium.ru/wp-content/uploads/2021/10/image-3.png" srcset="https://sysadminium.ru/wp-content/uploads/2021/10/image-3.png 887w, https://sysadminium.ru/wp-content/uploads/2021/10/image-3-300x231.png 300w, https://sysadminium.ru/wp-content/uploads/2021/10/image-3-768x591.png 768w" style="border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: bottom;" width="887" /></figure><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="Vkladka_General" style="box-sizing: inherit;">Вкладка General</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">На вкладке «<strong style="box-sizing: inherit;">General</strong>» нужно будет выполнить основную настройку добавляемого интерфейса.</p><figure class="wp-block-image size-full" style="background-color: #f4f4f4; box-sizing: inherit; color: #9090a0; font-family: Poppins, sans-serif; font-size: 16px; margin: 2em 0px;"><img alt="" class="wp-image-2664" decoding="async" height="451" sizes="(max-width: 620px) 100vw, 620px" src="https://sysadminium.ru/wp-content/uploads/2021/10/image-4.png" srcset="https://sysadminium.ru/wp-content/uploads/2021/10/image-4.png 620w, https://sysadminium.ru/wp-content/uploads/2021/10/image-4-300x218.png 300w" style="border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: bottom;" width="620" /></figure><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Name</strong> — придумайте имя для нового интерфейса.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">MTU</strong> — укажите MTU, который не должен превысить L2 MTU подчинённых интерфейсов и по умолчанию равен 1500.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">ARP</strong> — настройте протокол ARP:</p><ul style="background-color: #f4f4f4; box-sizing: border-box; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px; padding-left: 1.5em;"><li style="box-sizing: inherit;">disabled — интерфейс не будет использовать ARP;</li><li style="box-sizing: inherit;">enabled — интерфейс будет использовать ARP;</li><li style="box-sizing: inherit;">proxy-arp — интерфейс будет использовать функцию прокси ARP;</li><li style="box-sizing: inherit;">local-proxy-arp — интерфейс будет использовать функцию локального прокси ARP;</li><li style="box-sizing: inherit;">reply-only — интерфейс будет использовать только статичные ARP записи (добавленные вручную), динамически таблица ARP не будет заполняться;</li></ul><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">ARP Timeout</strong> — время, в течение которого запись ARP хранится в таблице ARP, если с IP-адреса не будет получено никаких пакетов за это время, то запись удаляется. Значение auto равно значению arp-timeout в IP / Settings (30 сек).</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Forced. MAC Address</strong> — здесь вы можете установить статичный mac адрес для создаваемого Bonding интерфейса. Но по умолчанию mac адрес отберётся у первого подчинённого физического интерфейса, а ему присвоится новое значение автоматически.</p><h2 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 42px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="Vkladka_Bonding" style="box-sizing: inherit;">Вкладка Bonding</span></h2><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">А на этой вкладке делаются основные настройки бондинка.</p><figure class="wp-block-image size-full" style="background-color: #f4f4f4; box-sizing: inherit; color: #9090a0; font-family: Poppins, sans-serif; font-size: 16px; margin: 2em 0px;"><img alt="" class="wp-image-2665" decoding="async" height="451" sizes="(max-width: 619px) 100vw, 619px" src="https://sysadminium.ru/wp-content/uploads/2021/10/image-5.png" srcset="https://sysadminium.ru/wp-content/uploads/2021/10/image-5.png 619w, https://sysadminium.ru/wp-content/uploads/2021/10/image-5-300x219.png 300w" style="border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: bottom;" width="619" /></figure><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Slaves</strong> — подчинённые физические порты, обычно 2 и больше;</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Mode</strong> — режим бондинга: 802.3ad (lacp), active backup, balance alb, balance rr, balance tlb, balance xor, broadcast. Каждый из режимов я опишу ниже.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Primary</strong> — первичный интерфейс для бондинга. Если primary не указан, то в качестве основного будет использоваться первый. Эту настройку можно выбрать только для некоторых режимов бондинга:</p><ul style="background-color: #f4f4f4; box-sizing: border-box; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px; padding-left: 1.5em;"><li style="box-sizing: inherit;">active-backup — какой интерфейс будет рабочим;</li><li style="box-sizing: inherit;">balance-tlb — какой интерфейс должен принимать весь трафик;</li><li style="box-sizing: inherit;">balance-alb — какой интерфейс должен получать несбалансированный трафик (трафик, не относящийся к IPv4).</li></ul><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Link Monitor</strong> — режим мониторинга подчинённых линков:</p><ul style="background-color: #f4f4f4; box-sizing: border-box; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px; padding-left: 1.5em;"><li style="box-sizing: inherit;">arp — вы можете задать ip адреса и если они будут отвечать на arp запросы, то линк считается доступным. Можно задать несколько ip адресов;</li><li style="box-sizing: inherit;">mii — мониторит только статус линка, но не проверяет возможность передачи по нему трафика. Этот вид мониторинга считается предпочтительным так-как может заметить потерю линка почти мгновенно;</li></ul><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Transmit Hash Policy</strong> — политика выбора передающего устройства основываясь на хеше. Эта настройка нужна только для режимов balance-xor и 802.3ad, а другие режимы не смотрят на неё:</p><ul style="background-color: #f4f4f4; box-sizing: border-box; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px; padding-left: 1.5em;"><li style="box-sizing: inherit;">Layer-2 — алгоритм использует XOR аппаратных MAC-адресов;</li><li style="box-sizing: inherit;">Layer-2-and-3 — алгоритм использует XOR MAC-адресов и IP-адресов для генерации хэша. Для не IP трафика будет работать также как Layer-2;</li><li style="box-sizing: inherit;">Level-3-and-4 — использует информацию протокола верхнего уровня для генерации хэша. Этот алгоритм не полностью соответствует стандарту 802.3ad.</li></ul><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Min. Links</strong> — здесь вы можете указать, сколько подчинённых линков должно быть поднято, чтобы bonding включился.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Down Delay</strong> — если обнаружен сбой соединения, то bonding отключается на это время. Это свойство действует только для mii мониторинга.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">Up Delay</strong> — если подчинённый линк был поднят, то bonding интерфейс отключиться на это время, а затем включится. Это свойство действует только для mii мониторинга.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">LACP Rate</strong> — в режиме lacp все линки обмениваются служебной информацией, можно указать интервал обмена в 30 секунд или в 1 секунду.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">MII Interval</strong> — по умолчанию MII проверяет линки каждые 100 ms, а здесь вы можете задать другое время интервала.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">На вкладках «<strong style="box-sizing: inherit;">Status</strong>» и «<strong style="box-sizing: inherit;">Traffic</strong>» вы ничего не настраиваете, а просто наблюдаете за работой бондинг интерфейса.</p><h2 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 42px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="Rezimy_bonding" style="box-sizing: inherit;">Режимы bonding</span></h2><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="8023ad" style="box-sizing: inherit;">802.3ad</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Режим <strong style="box-sizing: inherit;">802.3ad</strong> — это стандарт IEEE, также называемый <strong style="box-sizing: inherit;">LACP</strong> (Link Aggregation Control Protocol). Он включает автоматическую настройку агрегации, поэтому требуется минимальная настройка коммутатора. Этот стандарт также требует, чтобы кадры доставлялись по порядку, и соединения не должны видеть неправильную последовательность пакетов. Стандарт также требует, чтобы все устройства в совокупности работали с одинаковой скоростью и в дуплексном режиме.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"><strong style="box-sizing: inherit;">LACP</strong> балансирует исходящий трафик по активным физическим портам на основе <strong style="box-sizing: inherit;">Transmit Hash Policy</strong> и принимает входящий трафик с любого активного порта. Хэш включает в себя адрес источника и назначения (mac) и если присутствует тег VLAN то тег VLAN. А также адрес источника и назначения IPv4 / IPv6. Хеш рассчитывается в зависимости от параметра политики хеширования. Для этого режима мониторинг ARP не рекомендуется, поскольку ответы ARP могут поступать на один подчиненный порт из-за политики хэширования. Это может привести к несбалансированному передаваемому трафику, поэтому рекомендуется мониторинг MII.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Режим хеширования «layer 3 and 4» не полностью совместим с LACP.</p><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="balance-xor" style="box-sizing: inherit;">balance-xor</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">В этом режиме исходящий трафик по активным портам балансируется на основе хешированной информации заголовка протокола и принимается входящий трафик с любого активного порта. Этот режим очень похож на LACP, за исключением того, что он не стандартизирован и работает только с политикой хеширования <strong style="box-sizing: inherit;">layer 3 and 4</strong> .</p><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="balance-rr" style="box-sizing: inherit;">balance-rr</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Пакеты передаются в последовательном порядке от первого доступного физического порта до последнего. <strong style="box-sizing: inherit;">Balance-rr</strong> — единственный режим, который отправляет пакеты через несколько интерфейсов, принадлежащих одному и тому же TCP / IP-соединению.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">При использовании нескольких каналов передачи и приема, пакеты часто принимаются не по порядку, что приводит к повторной передаче сегментов, для других протоколов, таких как UDP. Это не проблема, если клиентское приложение может допускать приём пакетов с нарушением порядка.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Многие коммутаторы не поддерживают <strong style="box-sizing: inherit;">balance-rr</strong>.</p><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="active-backup" style="box-sizing: inherit;">active-backup</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">В этом режиме для передачи пакетов используется только одно активное устройство. Дополнительное подчиненное устройство становится активным только в случае отказа основного устройства.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">MAC-адрес bonding интерфейса отображается на активном порту, чтобы не запутать коммутатор.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Режим <strong style="box-sizing: inherit;">active-backup</strong> — лучший выбор для HA с несколькими соединенными между собой коммутаторами.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Мониторинг ARP в этом режиме не будет работать правильно, если оба маршрутизатора подключены напрямую. В таких случаях необходимо использовать мониторинг MII или установить коммутатор между маршрутизаторами.</p><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="broadcast" style="box-sizing: inherit;">broadcast</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Все физические подчинённые порты передают одни и те же пакеты в пункт назначения для обеспечения отказоустойчивости. Но этот режим не обеспечивает балансировку нагрузки.</p><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="balance-tlb" style="box-sizing: inherit;">balance-tlb</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">В этом режиме исходящий трафик балансируется по передающим подчинённым портам. При этом каждое соединение может иметь разную скорость и не требуется особой конфигурации коммутатора. Обратной стороной этого режима является то, что поддерживается только мониторинг канала MII (мониторинг канала ARP игнорируется при настройке), а входящий трафик не сбалансирован. То есть весь входящий трафик будет использовать линк, который настроен, как основной (Primary).</p><h3 class="wp-block-heading" style="background-color: #f4f4f4; box-sizing: inherit; clear: both; font-family: Poppins, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.3; margin: 16px 0px;"><span id="balance-alb" style="box-sizing: inherit;">balance-alb</span></h3><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;">Режим в основном такой же, как и balance-tlb, но входящий трафик IPv4 также сбалансирован. Также поддерживается только мониторинг канала MII. Дополнительным недостатком этого режима является то, что для него требуется возможность драйвера устройства изменять MAC-адрес.</p><p style="background-color: #f4f4f4; box-sizing: inherit; color: #6c626d; font-family: Poppins, sans-serif; font-size: 16px; margin: 0px 0px 1em;"></p><div class="snippet-type-10" id="snippet-box" style="background: rgb(245, 245, 245); border: 1px solid rgb(172, 172, 172); box-sizing: inherit; color: #333333; font-family: Poppins, sans-serif; font-size: 13px; margin: 0px 0px 15px; max-width: 600px; padding: 0px; width: 600px;"></div>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-16522892544741950192024-02-15T12:03:00.001+03:002024-02-15T12:03:03.437+03:00Горячие клавиши (hot key) Midnight Commander (mc)<p> <span style="background-color: white; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px;">В данной статье речь пойдет о горячих клавишах (hotkey) для файлового менеджера Midnight Commander (mc), знание которых позволяет повысить удобство и скорость работы.</span></p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">Midnight Commander (mc) - консольных файловый менеджер для операционных систем Linux, является свободным программным обеспечением</p><h2 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 21px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Горячие клавиши (hot key) для файловых панелей mc.</h2><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">Рассмотрим клавиши быстрого доступа для работы с панелями mc. Для удобства распределим hotkey по следующим группам.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">1. Работа с файлами.<br style="box-sizing: border-box;" />2. Работа с командной строкой.<br style="box-sizing: border-box;" />3. Работа с поиском.<br style="box-sizing: border-box;" />4. Работа с правами.<br style="box-sizing: border-box;" />5. Работа с ссылками.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Работа с файлами.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">F3 --> Просмотр файла.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">F4 --> Редактирование файла.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">SHIFT + F4 --> Создает новый файл.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">+ --> Вызывает окно для выделения группы.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">\ --> Снимает отметку с группы.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Работа с командной строкой.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + ENTER --> Вставить файл или каталог, на котором установлен курсор в командную строку.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + A --> Вставить в командную строку полный путь в активной панели.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + P --> Вернуть предыдущую выполненную команду в командную строку.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, T --> Вставка всех выделенных объектов в командную строку.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, CTRL + P --> Посылает в командную строку полный путь к нективной панели.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;"><img alt="midnight-commander" height="318" src="https://admin-gu.ru/images/article_img/linux/mc/midnight-commander.png" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%; vertical-align: middle;" width="505" /></p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px; text-align: center;"><em style="box-sizing: border-box;">Вид редактора Midnight Commander.</em></p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + T --> Смена режима отображения панели.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + [.] --> Cкрыть или показать скрытые файлы и каталоги начинаются на точку.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + A --> Вставить в командную строку полный путь в активной панели.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + C --> Cмена текущего каталога.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + H --> Просмотр последних выполненных команд.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + I --> Смена каталога на неактивной панели, на каталог в котором вы находитесь.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + O --> Неактивная панель переходит в каталог на который указывает активная панель.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, Q --> Просмотр содержимого файла на второй панели.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, I --> Просмотр информации о текущем объекте на второй панели.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + O --> Скрыть или показать панели.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + R --> Перечитать содержимое каталога.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + SPASE --> Показать размер текущего каталога.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Работа с поиском.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + SHIFT + [?] --> Расширенный поиск.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + S --> Поиск файла или каталога.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Работа с правами.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, O --> Просмотр или изменения владельца, группы.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, C --> Просмотр или изменение прав доступа.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Работа с ссылками.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, L --> Создать жесткую ссылку.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, S --> Создает символьную ссылку symlink.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X, CTRL + S --> Редактировать символическую ссылку.</p><h2 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 21px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Горячие клавиши (hot key) для редактора mc.</h2><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">Отдельно рассмотрим hotkey для работы в текстовом редакторе. Для удобства распределим по группам.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">1. Изменение вида редактора.<br style="box-sizing: border-box;" />2. Работа с текстом.<br style="box-sizing: border-box;" />3. Работа с файлами.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Изменение вида редактора.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + N --> Показать или скрыть нумерацию строк.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + S --> Включить или выключить подсветку синтаксиса.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + SHIFT + [-] --> Включить или отключить отображения табуляций и пробелов.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + SHIFT + [+] --> Включить или отключить автовыравнивание возвратом каретки.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Работа с текстом.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">F3 --> Начать выделение текста, повторное нажатие F3 закончит выделение.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">SHIFT + F3 --> Начать выделение блока текста, повторное нажатие F3 закончит выделение.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">F5 --> Скопировать выделенный текст.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">F6 --> Переместить выделенный текст.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">F8 --> Удалить выделенный текст.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + K --> Удалить часть строки до конца строки.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + Y --> Удалить строку.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + X --> Перейти в конец слова.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + Z --> Перейти на начало предыдущего слова.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + L --> Переход на строку по номеру строки.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + U --> Выполнить команду и вставить вывод результата команды в позицию под курсором.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">ALT + T --> Сортировка строк выделенного текста.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">TAB - Отодвигает вправо выделенный текст.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + U --> Отменить действия.</p><h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 19px; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">Работа с файлами.</h3><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + N --> Создать новый файл.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">CTRL + F --> Копировать выделенный текст в файл.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">SHIFT + F5 --> Вставка текста из файла.</p><p style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 18px; margin: 0px 0px 10px;">На этом обзор основных hotkey для Midnight Commander завершен.</p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-85836076409497296912024-02-02T17:15:00.002+03:002024-02-02T17:15:49.331+03:00Mikrotik переключение на резервного провайдера два способа, через шлюз и через NetWatch <p></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/IPreP9X73lU" width="478" youtube-src-id="IPreP9X73lU"></iframe></div><br /> <div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="399" src="https://www.youtube.com/embed/rktOpqFe-Wc" width="480" youtube-src-id="rktOpqFe-Wc"></iframe></div><br /><p></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-32594230239984249832024-01-30T17:53:00.001+03:002024-01-30T17:53:05.586+03:00Установка контроллера домена на samba debian 12<p> </p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="389" src="https://www.youtube.com/embed/3jQ9H_xr5AU" width="467" youtube-src-id="3jQ9H_xr5AU"></iframe></div><br /><p></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-67021959920994451442024-01-27T11:22:00.000+03:002024-01-27T11:22:00.828+03:00How to Install KDE Neon Distribution on Ubuntu<p></p><div class="enlighter-default enlighter-v-standard enlighter-t-beyond enlighter-l-generic enlighter-hover " style="background-color: #f7f7fa; border-radius: 5px; border: 2px solid rgb(226, 226, 232); color: #333333; direction: ltr; font-family: "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace; font-size: 12px; line-height: 1.35em; margin: 0px 0px 20px; overflow-wrap: break-word; padding: 10px 10px 10px 5px; position: relative; white-space-collapse: preserve;"><div class="enlighter-code" style="overflow: hidden;"><div class="enlighter" style="border-collapse: collapse; border-spacing: 0px; counter-reset: enlighter 0; display: table; empty-cells: show; font-size: 1em; margin: 0px; min-width: 100%; padding: 0px; width: 725px;"><div class="" style="border-radius: 0px 0px 8px 8px; border: 0px solid rgb(255, 255, 255); color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">sudo apt-add-repository </span><span class="enlighter-s0" style="color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">'deb http://archive.neon.kde.org/user bionic main'</span>This ensures that packages installed from this repository are trusted.</div></div></div></div></div><div class="enlighter-default enlighter-v-standard enlighter-t-beyond enlighter-l-generic enlighter-hover " style="background-color: #f7f7fa; border-radius: 5px; border: 2px solid rgb(226, 226, 232); color: #333333; direction: ltr; font-family: "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace; font-size: 12px; line-height: 1.35em; margin: 0px 0px 20px; overflow-wrap: break-word; padding: 10px 10px 10px 5px; position: relative; white-space-collapse: preserve;"><div class="enlighter-code" style="overflow: hidden;"><div class="enlighter" style="border-collapse: collapse; border-spacing: 0px; counter-reset: enlighter 0; display: table; empty-cells: show; font-size: 1em; margin: 0px; min-width: 100%; padding: 0px; width: 725px;"><div class="" style="border-radius: 0px 0px 8px 8px; border: 0px solid rgb(255, 255, 255); color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">wget -qO - </span><span class="enlighter-s0" style="color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">'http://archive.neon.kde.org/public.key'</span><span class="enlighter-text" style="color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="enlighter-g0" style="color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">|</span><span class="enlighter-text" style="color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> sudo apt-key add -</span></div></div></div></div></div><div class="enlighter-default enlighter-v-standard enlighter-t-beyond enlighter-l-generic enlighter-hover " style="background-color: #f7f7fa; border-radius: 5px; border: 2px solid rgb(226, 226, 232); color: #333333; direction: ltr; font-family: "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace; font-size: 12px; line-height: 1.35em; margin: 0px 0px 20px; overflow-wrap: break-word; padding: 10px 10px 10px 5px; position: relative; white-space-collapse: preserve;"><div class="enlighter-code" style="overflow: hidden;"><div class="enlighter" style="border-collapse: collapse; border-spacing: 0px; counter-reset: enlighter 0; display: table; empty-cells: show; font-size: 1em; margin: 0px; min-width: 100%; padding: 0px; width: 725px;"><div class="" style="border-radius: 8px 8px 0px 0px; border: 0px solid rgb(255, 255, 255); color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">sudo apt update</span></div></div><div class="" style="border-radius: 0px 0px 8px 8px; border: 0px solid rgb(255, 255, 255); color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">sudo apt install neon-desktop</span></div></div></div></div></div>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-35840214443727103272024-01-17T15:06:00.003+03:002024-01-17T15:06:52.196+03:00Создаем VLAN через subinterface в ОС CentOS/Fedora/RedHat<p> В этом посте расскажу о том, как настроить тегированный интерфейс VLAN с помощью встроенных программных средств Linux. В процессе рассмотрения будем использовать метод subinterface.</p><p><br /></p><p>Чтобы настроить тегированный интерфейс, необходимо, чтобы на сервере был загружен модуль ядра Linux — 8021q.</p><p><br /></p><p>Для загрузки модуля:</p><p><br /></p><p>modprobe 8021q</p><p><br /></p><p>Если модуль уже загружен, появится ошибка:</p><p>modprobe: ERROR: could not insert '8021q': Module already in kernel</p><p><br /></p><p>Этот модуль нужно добавить в автозагрузку:</p><p><br /></p><p>echo 8021q >> /etc/modules-load.d/8021q.conf</p><p><br /></p><p>Давайте создадим VLAN с идентификатором 10 для сетевого интерфейса eth0. Затем добавим конфигурационный файл ifcfg-eth0.10, который содержит описание подинтерфейса VLAN.</p><p><br /></p><p>Открываем файл:</p><p><br /></p><p>nano /etc/sysconfig/network-scripts/ifcfg-eth0.10</p><p><br /></p><p>И вписываем следующее:</p><p><br /></p><p>ONBOOT=yes</p><p>TYPE=Ethernet</p><p>VLAN=yes</p><p>DEVICE=eth0.10</p><p>BOOTPROTO=static</p><p>IPADDR=10.10.10.10</p><p>NETMASK=255.255.255.0</p><p><br /></p><p>Этот файл конфигурации устанавливает связь между виртуальным интерфейсом eth0.10 и физическим интерфейсом eth0. После создания этого файла конфигурации необходимо перезапустить сервис network.</p><p><br /></p><p>systemctl restart network</p><p><br /></p><p>Проверить сетевые настройки можно с помощью ip a и увидите, что subinterface с необходимым VLAN10 добавлен.</p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-11554200035030303172024-01-14T10:27:00.001+03:002024-01-14T10:27:11.287+03:00alias в linux<p> </p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='449' height='374' src='https://www.blogger.com/video.g?token=AD6v5dyBi8YDUrt6i0lZtY10dMgXjdxqQ0pssIwNLG86xFbxUOIPqxjj85IdsExxkjhdIapA9iZM5gAWtXt2Kn2vSA' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><br /><p></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-64297119131704264562024-01-14T09:47:00.000+03:002024-01-14T09:47:48.935+03:00Mikrotik Q in Q(VLAN Tunneling) config<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="392" src="https://www.youtube.com/embed/pNNYTB-TI-E" width="473" youtube-src-id="pNNYTB-TI-E"></iframe></div><p></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/pOkiyz02Vpg" width="478" youtube-src-id="pOkiyz02Vpg"></iframe></div><br /><p></p><p><br /></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-9233361390180440472024-01-11T11:50:00.004+03:002024-01-11T11:50:58.715+03:00Интернет и частная сеть, два шлюза в сети<p> </p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='388' height='268' src='https://www.blogger.com/video.g?token=AD6v5dzqgQexYNS3MZiJQ_ak-ROkkzULGPI8pRuH57n8hW3_sm53TBWVVegLt7O3A883YQ6cfvcGXzuFAdghn1fecg' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><br /><p></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-49836605321034971112023-12-23T08:59:00.001+03:002023-12-23T08:59:04.384+03:00Работа с сетью в Linux<p> </p><p><br /></p><p>ping # Пинг сетевого ресурса. Например, : ping google.ru ;</p><p>ifconfig # Утилита настройки сети. Примеры:</p><p>— ifconfig # Показать параметры всех активных сетевых интерфейсов;</p><p>— ifconfig -a # Показать все сетевые интерфейсы;</p><p>— ifconfig eth0 up # Запустить сетевой интерфейс eth0;</p><p>— ifconfig eth0 down # Отключить сетевой интерфейс eth0;</p><p>— ifconfig eth0 hw ether 00:01:02:03:04:05 # Смена MAC адреса;</p><p>— ifconfig eth0 192.168.1.1 netmask 255.255.255.0 # Назначить интерфейсу eth0 IP-адрес а так же маску подсети;</p><p><br /></p><p>— ifconfig eth0:0 192.168.0.1 netmask 255.255.255.0 # Задать дополнительный IP адрес сетевому интерфейсу eth0;</p><p>iwlist scan # просканировать эфир на предмет, доступности беспроводных точек доступа;</p><p>iwconfig # Утилита настройки беспроводных сетевых интерфейсов.</p><p>— iwconfig wlan0 # Показать конфигурацию беспроводного сетевого интерфейса wlan0;</p><p>— iwconfig wlan0 mode ad-hoc # Указываем тип сети — ad-hoc;</p><p>— iwconfig wlan0 channel 2 # Указываем частотный канал;</p><p>— iwconfig wlan0 essid inet # Указываем имя сети;</p><p>route # Настройка маршрутов. Примеры:</p><p>— route -n # Выводит на экран таблицу маршрутизации;</p><p>— route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 # добавить статический маршрут в сеть 192.168.0.0/16 через шлюз с IP-адресом 192.168.1.1 (для удаления меняем add на del);</p><p>netstat # Отображает текущие сетевые соединения.</p><p>- netstat -tup # Отобразить активные сетевые соединения: ;</p><p>— netstat -an | grep LISTEN # Показывает список всех открытых портов;</p><p>— netstat -anp -udp -tcp | grep LISTEN # Посмотреть список приложений, которые открывают порты;</p><p>ethtool # Информация о текущем режиме сетевого соединения и поддерживаемых. Примеры:</p><p><br /></p><p>- ethtool eth0 отображает статистику интерфеса eth0 с выводом такой информации, как поддерживаемые и текущие режимы соединения;</p><p>— ethtool -s eth0 speed 100 duplex full autoneg off # Принудительно задать скорость сетевому интерфейсу 100Mbit и режим Full duplex и отключить автоматическое определение;</p><p>tcpdump # Утилита сканирования сетевого трафика. Пример: tcpdump tcp port 80 отобразить весь трафик на TCP-порт 80;</p><p>iptables # Утилита настройки файервола;</p><p>ssh # Подключение к удаленному компьютеру по ssh. Например: ssh 192.168.1.3</p><p>wget # Утилита закачки. wget -c http://www.example.com/file.iso загрузить файл http://www.example.com/file.iso с возможностью останова и продолжения в последствии;</p><p><br /></p><p>whois # Узнать информацию о домене, пример: whois google.com ;</p><p>dig # Команда проверки доменных имён.</p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-30489451507955132012023-12-23T08:55:00.003+03:002023-12-23T08:55:32.762+03:00Наиболее часто используемые команды iptables:<p> 1️⃣ Команда используется для отображения текущих правил таблицы фильтрации пакетов.</p><p><br /></p><p>iptables -L</p><p><br /></p><p>2️⃣ Команда используется для отображения текущих правил таблицы преобразования сетевых адресов (NAT).</p><p><br /></p><p>iptables -t nat -L</p><p><br /></p><p>3️⃣ Команда добавляет правило в таблицу INPUT, которое разрешает все входящие TCP-пакеты на порту 80.</p><p><br /></p><p>iptables -A INPUT -p tcp --dport 80 -j ACCEPT</p><p><br /></p><p>4️⃣ Команда добавляет правило в таблицу FORWARD, которое разрешает все пакеты UDP на порту 53 (DNS-трафик).</p><p><br /></p><p>iptables -A FORWARD -p udp --dport 53 -j ACCEPT</p><p><br /></p><p>5️⃣ Команда добавляет правило в таблицу OUTPUT, которое разрешает все исходящие TCP-пакеты на порту 22 (SSH-трафик).</p><p><br /></p><p>iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT</p><p><br /></p><p>6️⃣ Команда добавляет правило в таблицу INPUT, которое блокирует все входящие TCP-пакеты на порту 22 (SSH-трафик).</p><p><br /></p><p>iptables -A INPUT -p tcp --dport 22 -j DROP</p><p><br /></p><p>7️⃣ Команда используется для добавления правила в таблицу nat, которое маскирует IP-адрес источника при отправке пакетов через интерфейс eth0.</p><p><br /></p><p>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</p><p><br /></p><p>8️⃣ Команда добавляет правило в таблицу FORWARD, которое разрешает все пакеты, пересылаемые между интерфейсами eth0 и eth1.</p><p><br /></p><p>iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT</p><p><br /></p><p>9️⃣ Команда добавляет правило в таблицу INPUT, которое разрешает все входящие пакеты на интерфейсе loopback (lo).</p><p><br /></p><p>iptables -A INPUT -i lo -j ACCEPT</p><p><br /></p><p>1️⃣0️⃣ Команда используется для отображения номеров сетевых интерфейсов вместе с текущими правилами таблицы фильтрации пакетов.</p><p><br /></p><p>iptables -L -n</p><div><br /></div>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-16551839659884668902023-12-22T23:04:00.002+03:002023-12-23T09:00:01.287+03:00Установка локального сервера кеширования DNS на Linux<p><span style="font-family: arial;"> <span style="background-color: #f1f2f6; color: #1f1f1f;">На самом деле поиск</span><span style="background-color: #f1f2f6; color: #1f1f1f;"> </span><span style="box-sizing: border-box; color: #1f1f1f; font-weight: bolder;">DNS</span><span style="background-color: #f1f2f6; color: #1f1f1f;"> </span><span style="background-color: #f1f2f6; color: #1f1f1f;">это не то, что требует частого внимания. Но иногда приходится заботиться об этом. Например, если у вашего провайдера слабые сервера или же в вашей сети часто происходят DNS обращения, то нужно настроить локальный кэширующий DNS сервер.</span></span></p><div class="article-item" style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; margin-bottom: 40px;"></div><span style="font-family: arial;"><a class="image featured" data-fslightbox="" href="https://wiki.merionet.ru/images/ustanovka-lokalnogo-servera-keshirovaniya-dns-na-linux/1.png" style="background-color: #f1f2f6; box-sizing: border-box; text-decoration-line: none; transition: all 0.2s linear 0s;"><img alt="Установка локального сервера кеширования DNS на Linux" class="article" src="https://wiki.merionet.ru/images/ustanovka-lokalnogo-servera-keshirovaniya-dns-na-linux/1.png" style="border-radius: 34px; border-style: none; box-sizing: border-box; display: block; height: auto; margin-bottom: 24px; margin-left: auto; margin-right: auto; max-width: 80%; overflow: hidden; padding: 40px 0px; vertical-align: middle;" title="Установка локального сервера кеширования DNS на Linux" /></a><span style="background-color: #f1f2f6; color: #1f1f1f;"></span></span><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Как кэширующий DNS-сервер может пригодиться?</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Кэширующий DNS-сервер занимается обработкой DNS запросов, которые выполняет ваша система, затем сохраняет результаты в памяти или кэширует их. В следующий раз, когда система посылает DNS запрос для того же адреса, то локальный сервер почти мгновенно выдает результат.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Эта идея может показаться бесполезной. Подумаешь, какие-то там секунды. Но если DNS сервера провайдера тратят много времени на разрешение имени, то в результате падает скорость Интернет серфинга. Например, домашняя страница новостного канала MSNBC для корректной работы обращается более чем к 100 уникальным доменам. Даже если на запрос тратится одна десятая секунды, в итоге получается 10 секунд ожидания, что по нынешним меркам слишком много.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Локальный кэширующий DNS увеличивает скорость не только дома или в офисе, он также помогает работе серверов. Например, у вас есть почтовый сервер с анти-спам фильтром, который выполняет очень много DNS запросов. Локальный кэш намного увеличить скорость его работы.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">И наконец, <code style="box-sizing: border-box;">system-resolved</code> поддерживает новейшие стандарты вроде DNSSEC и DNSoverTLS или DoT. Эти технологии увеличивают безопасность при работе в Интренет.</span></p><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Какой локальный кэширующий сервер выбрать?</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">В этом руководстве будет использован сервер <code style="box-sizing: border-box;">systemd-resolved</code>. Эта утилита является частью набора управления системой <code style="box-sizing: border-box;">systemd</code>. Если в вашей системе используется <code style="box-sizing: border-box;">systemd</code>, а большинство дистрибутивов Linux используют это, то в системе уже установлен <code style="box-sizing: border-box;">systemd-resolved</code>, но не запущен. Большинство систем не используют эту утилиту.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;"><code style="box-sizing: border-box;">systemd-resolved</code> запускает небольшой локальный кэширующий DNS-сервер, который мы настроим на запуск при загрузке системы. Затем мы изменим конфигурацию всей системы так, чтобы DNS запросы шли на локальный сервер.</span></p><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Как проверить используется ли systemd-resolved?</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">В некоторых дистрибутивах, например Ubuntu 19.04, по умолчанию используется <code style="box-sizing: border-box;">systemd-resolved</code>.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Если у вас уже запущен <code style="box-sizing: border-box;">systemd-resolved</code>, тогда не нужно что-то настраивать в системе. Но нужно проверить на корректность утилит управления сетевыми настройками, такие как <span style="box-sizing: border-box; font-weight: bolder;">NetworkManager</span>, так как они могут игнорировать системные настройки сети.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Перед тем как перейти к следующему разделу проверьте запущен ли в вашей системе <code style="box-sizing: border-box;">systemd-resolved</code>:</span></p><pre class="prettyprint hljs language-lua" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">$ resolvectl <span class="hljs-built_in" style="box-sizing: border-box; color: #e6c07b;">status</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Если в ответ получите сообщение ниже, значит в системе не настроен <code style="box-sizing: border-box;">systemd-resolved</code>:</span></p><pre class="prettyprint hljs language-kotlin" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">$ resolvectl status
Failed to <span class="hljs-keyword" style="box-sizing: border-box; color: #c678dd;">get</span> global <span class="hljs-keyword" style="box-sizing: border-box; color: #c678dd;">data</span>: <span class="hljs-built_in" style="box-sizing: border-box; color: #e6c07b;">Unit</span> dbus-org.freedesktop.resolve1.service not found.
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">И наоборот, если на выходе видите что-то подобное, то <code style="box-sizing: border-box;">systemd-resolved</code> уже работает:</span></p><pre class="prettyprint hljs language-yaml" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-string" style="box-sizing: border-box; color: #98c379;">Global</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">LLMNR setting:</span> <span class="hljs-literal" style="box-sizing: border-box; color: #56b6c2;">yes</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">MulticastDNS setting:</span> <span class="hljs-literal" style="box-sizing: border-box; color: #56b6c2;">yes</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">DNSOverTLS setting:</span> <span class="hljs-string" style="box-sizing: border-box; color: #98c379;">opportunistic</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">DNSSEC setting:</span> <span class="hljs-string" style="box-sizing: border-box; color: #98c379;">allow-downgrade</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">DNSSEC supported:</span> <span class="hljs-literal" style="box-sizing: border-box; color: #56b6c2;">no</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">Current DNS Server:</span> <span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.1</span><span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">.1</span><span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">.1</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">DNS Servers:</span> <span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.1</span><span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">.1</span><span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">.1</span>
<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.0</span><span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">.0</span><span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">.1</span>
</span></pre><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Включение и настройка systemd-resolved</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Отдельно устанавливать <code style="box-sizing: border-box;">systemd-resolved</code> не нужно, так как этот сервис является частью <code style="box-sizing: border-box;">systemd</code>. Всё что нужно сделать это запустить его и добавить в автозагрузку. Для включения данной службы введите команду ниже:</span></p><pre class="prettyprint hljs language-ruby" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-variable" style="box-sizing: border-box; color: #d19a66;">$ </span>sudo systemctl start systemd-resolved.service
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Далее нужно ввести следующую команду, чтобы добавить службу в автозапуск.</span></p><pre class="prettyprint hljs language-shell" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-meta prompt_" style="box-sizing: border-box; color: #61aeee;">$ </span><span class="language-bash" style="box-sizing: border-box;">sudo systemctl <span class="hljs-built_in" style="box-sizing: border-box; color: #e6c07b;">enable</span> systemd-resolved.service</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">И наконец нужно прописать DNS сервера, куда будет обращаться локальный сервер для разрешения имен. Есть много разных сервисов, но приведённые ниже самые быстрые, бесплатные и оба поддерживают <span style="box-sizing: border-box; font-weight: bolder;">DNSSEC</span> и <span style="box-sizing: border-box; font-weight: bolder;">DoT</span>:</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="box-sizing: border-box; font-family: arial; font-weight: bolder;">Google Public DNS</span></p><pre class="prettyprint hljs language-undefined" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">8.8.8.8
8.8.4.4
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="box-sizing: border-box; font-family: arial; font-weight: bolder;">Cloudflare Public DNS</span></p><pre class="prettyprint hljs language-undefined" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">1.1.1.1
1.0.0.1
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Для этого откройте конфигурационный файл <code style="box-sizing: border-box;">systemd-resolved</code> любым текстовым редактором:</span></p><pre class="prettyprint hljs language-shell" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-meta prompt_" style="box-sizing: border-box; color: #61aeee;">$ </span><span class="language-bash" style="box-sizing: border-box;">sudo nano /etc/systemd/resolved.conf</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Отредактируйте строку, которая начинается на:</span></p><pre class="prettyprint hljs language-bash" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-comment" style="box-sizing: border-box; color: #5c6370; font-style: italic;">#DNS=</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">И пропишите одну из вышеуказанных пар. Мы используем <span style="box-sizing: border-box; font-weight: bolder;">Cloudflare Public DNS</span>:</span></p><pre class="prettyprint hljs language-ini" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">DNS</span>=<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.1</span>.<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.1</span> <span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.0</span>.<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">0.1</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Сохраните изменения и перезапустите службу <code style="box-sizing: border-box;">systemd-resolved</code>:</span></p><pre class="prettyprint hljs language-ruby" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-variable" style="box-sizing: border-box; color: #d19a66;">$ </span>sudo systemctl restart systemd-resolved.service
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Итак, <code style="box-sizing: border-box;">systemd-resolved уже запущен</code> и готов для выполнения быстрых и безопасных DNS запросов, как только мы настроим систему соответствующим образом.</span></p><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Настройка системы для использования systemd-resolved</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Есть несколько путей настройки системы на использование локального DNS сервера. Мы рассмотрим два наиболее используемых метода. Первый – рекомендуемый метод, второй конфигурация в режиме совместимости. Разница в том, как будет обрабатываться файл <code style="box-sizing: border-box;">/etc/resolv.conf</code>.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">В файле <code style="box-sizing: border-box;">/etc/resolv.conf</code> содержатся IP адреса серверов разрешения имен, которые используются программами. Программы при необходимости разрешения доменного имени обращаются к этому файлу в поисках адресов серверов разрешения имен.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Итак, первый метод конфигурации заключается в создании символьной ссылки на <code style="box-sizing: border-box;">/run/systemd/resolve/stub-resolv.conf</code>. В этом случае файл <code style="box-sizing: border-box;">/etc/resolv.conf</code> управляется службой <code style="box-sizing: border-box;">systemd-resolved</code>.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Это может вызвать проблемы в том случае, если другие программы пытаются управлять файлом <code style="box-sizing: border-box;">/etc/resolv.conf</code>. Режим совместимости оставляет <code style="box-sizing: border-box;">/etc/resolv.conf</code> не тронутым, позволяя программам управлять им. В этом режиме, в настройках программ, управляющих файлом <code style="box-sizing: border-box;">/etc/resolv.conf</code> в качестве системного сервера разрешения имен должен быть указан IP <code style="box-sizing: border-box;">127.0.0.53</code>.</span></p><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Конфигурация в рекомендуемом режиме</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">При этом режиме конфигурация проводится вручную. Сначала нужно удалить или переименоваться оригинальный файл <code style="box-sizing: border-box;">/etc/resolv.conf</code>. Лучше переименовать, чтобы при необходимости можно было использовать информацию в нем</span></p><span style="background-color: #f1f2f6; color: #1f1f1f; font-family: arial;">.</span><pre class="prettyprint hljs language-shell" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-meta prompt_" style="box-sizing: border-box; color: #61aeee;">$ </span><span class="language-bash" style="box-sizing: border-box;">sudo <span class="hljs-built_in" style="box-sizing: border-box; color: #e6c07b;">mv</span> /etc/resolv.conf /etc/resolv.conf.original</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Затем создаем символьную ссылку:</span></p><pre class="prettyprint hljs language-shell" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-meta prompt_" style="box-sizing: border-box; color: #61aeee;">$ </span><span class="language-bash" style="box-sizing: border-box;">sudo <span class="hljs-built_in" style="box-sizing: border-box; color: #e6c07b;">ln</span> -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">И наконец перезапускаем службу <code style="box-sizing: border-box;">systemd-resolved</code>:</span></p><pre class="prettyprint hljs language-ruby" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-variable" style="box-sizing: border-box; color: #d19a66;">$ </span>sudo systemctl restart systemd-resolved.service
</span></pre><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Настройка в режиме совместимости</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">В режиме совместимости, нужно убедиться, что локальный сервер разрешения имен <code style="box-sizing: border-box;">system-resolved</code> запущен и используется системными службами. Откройте файл <code style="box-sizing: border-box;">/etc/resolv.conf</code> любым редактором:</span></p><pre class="prettyprint hljs language-shell" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-meta prompt_" style="box-sizing: border-box; color: #61aeee;">$ </span><span class="language-bash" style="box-sizing: border-box;">sudo nano /etc/resolv.conf</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Удалите все строки, которые содержать ключевое слово <code style="box-sizing: border-box;">nameserver</code> и добавьте одну единственную строку:</span></p><pre class="prettyprint hljs language-undefined" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">nameserver 127.0.0.53
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Этот файл мажет быть изменён любой программой. Чтобы предотвратить это нужно настроить программы так, чтобы в качестве DNS они использовали адрес <code style="box-sizing: border-box;">127.0.0.53</code>.</span></p><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Отладка systemd-resolved</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Посмотреть, как система выполняет DNS запросы после внесённых изменений сложно. Самый эффективный метод – это включить режим отладки для службы <code style="box-sizing: border-box;">systemd-resolved</code>, а затем просмотреть файл логов.</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;"><code style="box-sizing: border-box;">systemd-resolved</code> можно перевести в режим отладки созданием специального служебного файла, в котором содержатся настройки отладки. Делается это следующей командой:</span></p><pre class="prettyprint hljs language-ruby" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-variable" style="box-sizing: border-box; color: #d19a66;">$ </span>sudo systemctl edit systemd-resolved.service
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Вставьте в файл следующие строки:</span></p><pre class="prettyprint hljs language-ini" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-section" style="box-sizing: border-box; color: #e06c75;">[Service]</span>
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">Environment</span>=SYSTEMD_LOG_LEVEL=debug
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">После этого служба <code style="box-sizing: border-box;">systemd-resolved</code> автоматический перезапуститься. Откройте второй терминал и просмотрите логи в <code style="box-sizing: border-box;">journald</code>:</span></p><pre class="prettyprint hljs language-ruby" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-variable" style="box-sizing: border-box; color: #d19a66;">$ </span>sudo journalctl -f -u systemd-resolved
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Строка, которая содержит слова <code style="box-sizing: border-box;">“Using DNS server”</code> показывает, какой DNS сервер используется для разрешения имён. В нашем случае это DNS сервера Cloudflare</span></p><pre class="prettyprint hljs language-rust" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">Using DNS server <span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.1</span>.<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">1.1</span> <span class="hljs-keyword" style="box-sizing: border-box; color: #c678dd;">for</span> <span class="hljs-title class_" style="box-sizing: border-box; color: #e6c07b;">transaction</span> <span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">19995</span>.
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Слова <code style="box-sizing: border-box;">“Cache miss”</code> в начале строки означает, что для данного домена нет закэшированной информации:</span></p><pre class="prettyprint hljs language-rust" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">Cache miss <span class="hljs-keyword" style="box-sizing: border-box; color: #c678dd;">for</span> <span class="hljs-title class_" style="box-sizing: border-box; color: #e6c07b;">example</span>.com IN SOA
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">И наконец слова <code style="box-sizing: border-box;">“Positive cache”</code> в начале строки означает, что <code style="box-sizing: border-box;">systemd-resolved</code> уже запрашивал информацию об этом домене и теперь ответы возвращает из кэша:</span></p><pre class="prettyprint hljs language-css" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;">Positive cache hit for example<span class="hljs-selector-class" style="box-sizing: border-box; color: #d19a66;">.com</span> IN <span class="hljs-selector-tag" style="box-sizing: border-box; color: #e06c75;">A</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Не забудьте отключить режим отладки, так как в это время создается большой файл логов. Сделать это можно командой:</span></p><pre class="prettyprint hljs language-ruby" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-variable" style="box-sizing: border-box; color: #d19a66;">$ </span>sudo systemctl edit systemd-resolved.service
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">а затем удалить добавленные выше две строки.</span></p><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Использование защищенных DNS запросов</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">systemd-resolved один из немногих DNS серверов, которые поддерживает <span style="box-sizing: border-box; font-weight: bolder;">DNSSEC</span> и <span style="box-sizing: border-box; font-weight: bolder;">DNSoverTLS</span>. Эта два механизма позволяют убедиться, что полученная DNS информация подлинная (<span style="box-sizing: border-box; font-weight: bolder;">DNSSEC</span>) и он не был изменён по пути (<span style="box-sizing: border-box; font-weight: bolder;">DoT</span>).</span></p><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Эти функции легко включаются редактированием основного конфигурационного файла <code style="box-sizing: border-box;">system-resolved</code>:</span></p><pre class="prettyprint hljs language-shell" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-meta prompt_" style="box-sizing: border-box; color: #61aeee;">$ </span><span class="language-bash" style="box-sizing: border-box;">sudo nano /etc/systemd/resolved.conf</span>
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Измените файл следующим образом:</span></p><pre class="prettyprint hljs language-ini" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">DNSSEC</span>=allow-downgrade
<span class="hljs-attr" style="box-sizing: border-box; color: #d19a66;">DNSOverTLS</span>=opportunistic
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Сохраните изменения и перезапустите службу <code style="box-sizing: border-box;">systemd-resolved</code>.</span></p><pre class="prettyprint hljs language-ruby" style="background: rgb(40, 44, 52); border-radius: 5px; border: 1px solid var(--main); box-sizing: border-box; color: #abb2bf; line-height: 27.04px; overflow: auto; padding: 10px; width: 1306px;"><span style="font-family: arial;"><span class="hljs-variable" style="box-sizing: border-box; color: #d19a66;">$ </span>sudo systemctl restart systemd-resolved.service
</span></pre><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px 0px 24px;"><span style="font-family: arial;">Пока прописанные DNS сервера поддерживают эти две функции все DNS запросы будут защищены. DNS сервера Google и CloudFlare поддерживают эти механизмы защиты.</span></p><hr style="background-color: #f1f2f6; box-sizing: content-box; color: #1f1f1f; height: 0px; overflow: visible;" /><h3 style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 41.8px; margin: 24px 0px;"><span style="font-family: arial; font-size: small;">Заключение</span></h3><p style="background-color: #f1f2f6; box-sizing: border-box; color: #1f1f1f; line-height: 43.2px; margin: 0px;"><span style="font-family: arial;">Теперь ваша система будет выполнять DNS запросы быстро и эффективно даже если провайдер не работает достаточно быстро. Кроме этого, ваша цифровая жизнь лучше защищена новейшими механизмами защиты DNS запросов.</span></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-8610838939341528712023-12-17T10:35:00.006+03:002023-12-17T10:35:42.655+03:00Как сделать системный вид окна на Linux в Яндекс Барузере<p><span style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;">По умолчанию Браузер не использует системную рамку окна в Linux и изменяет дизайн элементов управления. Если вы хотите вернуть стандартный вид окна и элементов управления Linux:</span></p><span style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;">Наберите в Умной строке адрес browser://flags</span><br style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;" /><span style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;">Наберите в строке поиска флаг </span><a href="https://vk.com/feed?section=search&q=%23enable" style="background-color: white; cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px; text-decoration-line: none;">#enable</a><span style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;">-system-frame</span><br style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;" /><span style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;">Включите опцию System window controls.</span><br style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;" /><span style="background-color: white; font-family: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", "Noto Sans Armenian", "Noto Sans Bengali", "Noto Sans Cherokee", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Hebrew", "Noto Sans Kannada", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Osmanya", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Thai", sans-serif; font-size: 13px;">Перезапустите Браузер и проверьте результат.</span>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com1tag:blogger.com,1999:blog-7622156039663595675.post-45071761556999312692023-12-14T17:29:00.004+03:002023-12-14T17:29:31.940+03:00Настройка коммутатора D-Link<p> </p><h5 id="title0" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Подключение через серийный порт RS-232</h5><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">После подключения компьютера к интерфейсу RS-232 перейти в каталог /dev/ и посмотреть название виртуальной консоли для usb, скорее всего оно будет отображаться как /dev/ttyUSB0<br style="box-sizing: border-box;" />Для удобства настройки серийного порта в linux ubuntu и подключения к консоли коммутатора установить:</p><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;"></p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">apt install minicom putty</code></pre></div><p></p><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Настроить серийный порт в linux ubuntu, установить значения 9600 8N1</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">sudo minicom -s</code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Запустить putty и выставить такие же параметры для серийного порта</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">sudo putty</code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">По умолчанию для входа в консоль коммутатора D-Link DES-320028 логин и пароль пустые, поэтому: Enter Enter Enter<br style="box-sizing: border-box;" />В консоли коммутатора изменить ip-адрес интерфейса управления коммутатора на ip который будет соответствовать локальной сети, а также указать шлюз по умолчанию для данной сети:</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">config ipif System vlan default ipaddress 192.168.1.10/24
create iproute default 192.168.1.254
show switch</code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Для последующей настройки можно использовать удобный веб-интерфейс управления коммутатором, который будет доступен по адресу http://192.168.1.10 Если неудобно использовать провод и есть необходимость использовать консоль, тогда можно подключиться через telnet</p><h5 id="title1" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Справка по командам</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
#Вызов справки по командам
?
#команды конфигурирования
config ?
#вывод команд для просмотра существующих настроек
show ?
</code></pre></div><h5 id="title2" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Сетевые настройки управления коммутатором</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">#изменение ip адреса интерфейса управлением коммутатора
config ipif System vlan default ipaddress 192.168.1.10/24
#шлюз по умолчанию
create iproute default 192.168.1.254
#Информация об IP интерфейсе
show ipif
#Вывод основных настроек коммутатора(mac, ip, geteway ...)
show switch
#создание учетной записи
</code></pre></div><h5 id="title3" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Добавление пользователей</h5><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Три уровня привилегий пользователя по убыванию: Admin, Operator, User</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">create account admin dlink
DES-3200-28:5#show account
Command: show account
Current Accounts:
Username Access Level
------------------ ------------
dlink Admin
Total Entries : 1
#отключить режим администратирования
logout
#включить режим администратирования
login
#смена пароля пользователя dlink
config account dlink
#удаление пользователя dlink
delete account dlink</code></pre></div><h5 id="title4" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Баннер и время</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
#изменение баннера приветствия
config greeting_message
#дата и время
config time 20102022 21:57:50
#временная зона
config time_zone operator + hour 3 min 0
#проверить настройки: дата-время/зона
show time
</code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Есть возможность синхронизировать время используя протокол SNTP</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">enable sntp</code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Корректное время необходимо для поиска ошибок в журналах</p><h5 id="title5" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Конфигурация портов</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
#Выбор портов (один из 24, диапазон 1-5, all т.е. все)
config ports all ... действие (состояние, скорость, режим ...)
#Текущее состояние диапазона портов
show ports description 1-2
#Включить/отключить диапазон портов (disable/enable)
config ports 1-2 state disable
#Просмотр состояние порта
show ports 5 description
#Ограничить скорость передачи, дуплексный режим, изучение MAC-адресов, управление потоком, поднять интерфейс
config ports 20 speed 10_full learning enable state enable flow_control enable
#Ошибки портов
show error ports 1
#Статистика передачи пакетов для порта 1
show packet ports 1
</code></pre></div><h5 id="title6" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Сохранение, сброс настроек, конфигурация, прошивка</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
#сброс настроек до заводских (не все) и не перезагрузится
reset config
#сброс настроек до заводских(полностью) после перезагрузится
reset system
#сброс настроек частично
reset
#сохранить изменения в RAM
save
#перезагрузить
reboot
#Загрузка прошивки ( в конце название файла, название прошивки, номер прош. )
download firmware_fromTFTP 192.168.1.110 3528.had image_id 1
#Загрузка конфигурации с TFTP сервера
download cfg_fromTFTP 192.168.1.110 /cfg/setting.txt
#Выгрузка конфигурации на TFTP сервер
upload cfg_toTFTP 10.48.74.121 /cfg/setting.txt
#версия прошивки
show firmware information
#выбор прошивки в памяти (boot_up - выбрать, delete - удалить прош-ку)
config firmware image_id 2 boot_up
</code></pre></div><h5 id="title7" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Таблица коммутации, журнал логов</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
#Таблица коммутации (vlan, mac, port, type)
show fdb
#Просмотр логов коммутатора
show log
</code></pre></div><h5 id="title8" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Замена прошивки</h5><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Получить актуальную прошивку можно на официальном сайте производителя<br style="box-sizing: border-box;" />В коммутаторе есть текущая прошивка image_id 1 и возможно осталась старая прошивка image_id 2<br style="box-sizing: border-box;" />Перед тем как загрузить прошивку, необходимо удалить старую прошивку image_id 2 и сбросить конфигурацию коммутатора</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
reset config
switch-mipk:5#config firmware image_id 2 delete
Command: config firmware image_id 2 delete
Are you sure want to delete image_id 2 ?(y/n)
Please wait, deleting image ........... Done.
Success.
DES-3200-28:5#show firmware information
Command: show firmware information
Image ID : 1(Boot up firmware)
Version : 1.83.B008
Size : 4111052 Bytes
Update Time: 0000/00/80 04:12:12
From : 192.168.100.1
User : admin(Telnet)
Image ID : 2(Empty)
DES-3200-28:5#download firmware_fromTFTP 192.168.1.6 DES-3200R_1.91.B06.had imag
e_id 2
Command: download firmware_fromTFTP 192.168.1.6 DES-3200R_1.91.B06.had image_id 2
Connecting to server................... Done.
Download firmware...................... Done. Do not power off !!
Please wait, programming flash......... Done.
Success.
DES-3200-28:5#show firmware information
Command: show firmware information
Image ID : 1(Boot up firmware)
Version : 1.83.B008
Size : 4111052 Bytes
Update Time: 0000/00/80 04:12:12
From : 192.168.100.1
User : admin(Telnet)
Image ID : 2
Version : 1.91.B006
Size : 4291456 Bytes
Update Time: 0000/00/15 16:17:17
From : 192.168.1.6
User : Anonymous(Telnet)
DES-3200-28:5#config firmware image_id 2 boot_up
Command: config firmware image_id 2 boot_up
Success.
</code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Обновление прошивки вступит в силу только после сохранения и перезагрузки:</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">DES-3200-28:5#save
Command: save
Saving all configurations to NV-RAM...... Done.
Success.
DES-3200-28:5#reboot
Command: reboot
Are you sure you want to proceed with the system reboot?(y/n)</code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Посмотреть текущую прошивку можно командой:</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">#show switch</code></pre></div><h5 id="title9" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Выгрузка и загрузка конфигурации</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
#Просмотр текущей конфигурации
#show config current_config
#слить файл на tftp сервер:
DES-3200-28:5#upload cfg_toTFTP 192.168.1.6 conf.cfg
Command: upload cfg_toTFTP 192.168.1.6 conf.cfg
Connecting to server................... Done.
Upload configuration................... Done.
Success.
#Загрузить файл:
DES-3200-28:5#download cfg_fromTFTP 192.168.1.6 conf.cfg
Command: download cfg_fromTFTP 192.168.1.6 conf.cfg
Connecting to server................... Done.
Download configuration................. Done.
</code></pre></div><h5 id="title10" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Выгрузка log файлов</h5><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">DES-3200-28:5#upload log_toTFTP 192.168.1.6 test.log
Command: upload log_toTFTP 192.168.1.6 test.log
Connecting to server................... Done.
Upload log............................. Done.
Success. </code></pre></div><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;"><span style="box-sizing: border-box; font-weight: bolder;">Чтобы файл (конфигурация или логи) загрузился на tftp сервер, необходимо создать его на tftp сервере и разрешить права на запись</span></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-61597162196502987912023-12-14T17:28:00.003+03:002023-12-14T17:28:40.426+03:00Конфигурация Q-in-Q на коммутаторе D-link DES-3200-26-28<p> <span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">Q-in-Q или Double VLAN ( стандарт IEEE 802.1ad ) позволяет добавлять в маркированные кадры второй ( внешний ) тег vlan IEEE 802.1Q ( для провайдера ), что позволяет сохранять vlan id клиента внутри сети провайдера.</span></p><hr style="background-color: #f0f0f0; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: initial; border-top-style: solid; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 1rem 0px; opacity: 0.25;" /><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">Существует две реализации функции Q-in-Q: Port-based Q-in-Q ( на основе порта коммутатора провайдера ) и Selective Q-in-Q ( на основе данных внутреннего тега клиента )</span><br style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;" /><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">Реализация на основе Selective Q-in-Q позволяет дополнительно присваивать приоритет для обработки кадра</span><hr style="background-color: #f0f0f0; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: initial; border-top-style: solid; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 1rem 0px; opacity: 0.25;" /><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">Порты граничных коммутаторов, которые используют функцию Q-in-Q используют два типа порта:</span><br style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;" /><span style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; font-weight: bolder;">UNI (User-to-Network Interface) </span><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">- для клиентских сетей</span><br style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;" /><span style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; font-weight: bolder;">NNI (Network-to-Network Interface)</span><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;"> - для других граничных коммутаторов</span><hr style="background-color: #f0f0f0; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: initial; border-top-style: solid; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 1rem 0px; opacity: 0.25;" /><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">На портах UNI граничного коммутатора задаются правила соответствия CVLAN идентификаторам SP-VLAN (Service Provider).</span><hr style="background-color: #f0f0f0; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: initial; border-top-style: solid; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 1rem 0px; opacity: 0.25;" /><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">Если кадр является маркированным, приоритет внешнего тега по умолчанию равно значению приоритета внутреннего тега. Если приоритет в полученном кадре отсутствует, тогда будет использоваться приоритет входного порта UNI</span><hr style="background-color: #f0f0f0; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: initial; border-top-style: solid; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 1rem 0px; opacity: 0.25;" /><span style="background-color: #f0f0f0; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px;">При передаче кадра из сети провайдера в клиентскую сеть внешний тег удаляется граничным коммутатором</span><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;"></p><h5 id="title1" style="background-color: #f0f0f0; box-sizing: border-box; color: brown; font-family: "Exo 2", sans-serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin: 15px 0px 0px; padding: 10px 0px 0px;">Port-based Q-in-Q</h5><p style="background-color: #f0f0f0; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 18px; margin: 10px 0px 0px; padding: 0px;">Q-in-Q используется в сети провайдеров услуг. Во внутренней сети провайдера определяются порты NNI, для внешних портов коммутаторов ( обычно L3 ) провайдера и для коммутаторов уровня доступа определяются порты UNI</p><div class="mycode" style="background: rgb(68, 68, 68); border-radius: 2px; box-sizing: border-box; color: #212529; font-family: "Exo 2", sans-serif; font-size: 16px; margin: 5px 0px 0px; padding: 0px;"><pre style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 0.875em; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code style="box-sizing: border-box; color: #85d7ff; display: block; font-family: var(--bs-font-monospace); font-size: inherit; margin: 0px; overflow-wrap: break-word; padding: 10px; word-break: normal;">
#Активировать Q-in-Q
enable qinq
#Удалить порты по умолчанию
config vlan default delete 1-24
#Создать vlan
create vlan 100 tag 100
create vlan 200 tag 200
#Назначить порты доступа для созданных vlan
config vlan 100 add untagged 1-12
config vlan 200 add untagged 13-24
#Определить порты uplink в созданных vlan
config vlan 100 add tagged 25-27
config vlan 200 add tagged 25-27
#Определить роли портов vlan
config qinq ports 1-24 role uni</code></pre></div>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-73106002831831138552023-12-05T16:50:00.003+03:002023-12-05T16:50:59.275+03:00Тестирование пропускной способности канала связи с помощью Iperf<p> <span style="white-space-collapse: preserve;">В этой публикации будет рассмотрен один из наиболее популярных способов тестирования пропускной способности канала связи. </span></p><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Задачу тестирования пропускной способности обычно необходимо решать в тех ситуациях, когда нужно проверить потенциально возможную максимальную скорость передачи информации от одного хоста до другого хоста с учётом всего промежуточного оборудования. Или же, например, в сценариях тестирования производительности клиентов за VPN. </p><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Общая схема тестируемого сценария следующая:</p><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-3.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">В качестве операционной системы здесь будет использоваться Linux Ubuntu 22.04.</p><h3 dir="auto" id="Настройка-на-стороне-сервера" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 28px; margin: 18px 21px 9px; padding: 0px; white-space-collapse: preserve;">Настройка на стороне сервера</h3><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Обновим метаинформацию по репозиториям и установим iperf3:</p><pre dir="auto" spellcheck="false" style="background: rgb(245, 248, 252); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: Menlo, "Courier New", Courier, monospace; font-size: 16px; margin-bottom: 14px; margin-top: 14px; overflow-wrap: break-word; padding: 7px 21px; text-wrap: wrap;">sudo apt update
sudo apt install -y iperf3
</pre><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Запустим сервер iperf на прослушивание подключения от клиентов по всем доступным IP-адресам:</p><pre dir="auto" spellcheck="false" style="background: rgb(245, 248, 252); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: Menlo, "Courier New", Courier, monospace; font-size: 16px; margin-bottom: 14px; margin-top: 14px; overflow-wrap: break-word; padding: 7px 21px; text-wrap: wrap;">sudo iperf3 -s 0.0.0.0
</pre><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Убедитесь, что порт TCP/5201 не закрыт брандмауэром.</p><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-4.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Теперь можно переходить к тестированию со стороны клиентов.</p><h3 dir="auto" id="Запуск-iperf-на-клиенте-Linux" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 28px; margin: 18px 21px 9px; padding: 0px; white-space-collapse: preserve;">Запуск iperf на клиенте Linux</h3><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Обновим метаинформацию по репозиториям и установим iperf3:</p><pre dir="auto" spellcheck="false" style="background: rgb(245, 248, 252); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: Menlo, "Courier New", Courier, monospace; font-size: 16px; margin-bottom: 14px; margin-top: 14px; overflow-wrap: break-word; padding: 7px 21px; text-wrap: wrap;">sudo apt update
sudo apt install -y iperf3
</pre><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Запустим тест производительности канала связи до сервера iperf. Тестирование буем выполнять в течении одной минуты:</p><pre dir="auto" spellcheck="false" style="background: rgb(245, 248, 252); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: Menlo, "Courier New", Courier, monospace; font-size: 16px; margin-bottom: 14px; margin-top: 14px; overflow-wrap: break-word; padding: 7px 21px; text-wrap: wrap;">sudo iperf3 -c 10.10.10.71 -V -t 60
Linux task 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64
Control connection MSS 1448
Time: Sat, 16 Sep 2023 10:43:27 GMT
Connecting to host 10.10.10.71, port 5201
Cookie: kmijzbq5bc2oiync7ftnwbdetvmep76gfcb7
TCP MSS: 1448 (default)
[ 5] local 10.10.10.35 port 44954 connected to 10.10.10.71 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 60 second test, tos 0
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 89.2 MBytes 748 Mbits/sec 652 90.5 KBytes
[ 5] 1.00-2.00 sec 74.3 MBytes 623 Mbits/sec 291 53.7 KBytes
[ 5] 2.00-3.00 sec 89.4 MBytes 750 Mbits/sec 613 228 KBytes
[ 5] 3.00-4.00 sec 174 MBytes 1.46 Gbits/sec 375 346 KBytes
[ 5] 4.00-5.00 sec 289 MBytes 2.42 Gbits/sec 100 525 KBytes
<...>
[ 5] 57.00-58.00 sec 119 MBytes 996 Mbits/sec 618 338 KBytes
[ 5] 58.00-59.00 sec 91.2 MBytes 765 Mbits/sec 1064 198 KBytes
[ 5] 59.00-60.00 sec 104 MBytes 870 Mbits/sec 490 91.9 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-60.00 sec 6.75 GBytes 966 Mbits/sec 28107 sender
[ 5] 0.00-60.00 sec 6.75 GBytes 966 Mbits/sec receiver
CPU Utilization: local/sender 12.0% (0.0%u/12.0%s), remote/receiver 4.4% (0.0%u/4.4%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic
iperf Done.
root@task:/home/roman#
</pre><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-5-1024x418.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-6.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Как видно по результатам выше – средняя скорость передачи данных по каналу связи немного не дотягивает до одного гигабита в секунду.</p><h3 dir="auto" id="Запуск-iperf-на-клиенте-Windows" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 28px; margin: 18px 21px 9px; padding: 0px; white-space-collapse: preserve;">Запуск iperf на клиенте Windows</h3><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Для запуска клиента iperf на Windows предварительно необходимо <a href="https://iperf.fr/iperf-download.php#windows" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0.44); border-bottom: 0.1em solid rgba(0, 0, 0, 0.7); text-decoration-line: none;" target="_blank">загрузить дистрибутив.</a></p><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-7.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Распаковываем архив:</p><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-8.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">И запускаем тест производительности канала:</p><pre dir="auto" spellcheck="false" style="background: rgb(245, 248, 252); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: Menlo, "Courier New", Courier, monospace; font-size: 16px; margin-bottom: 14px; margin-top: 14px; overflow-wrap: break-word; padding: 7px 21px; text-wrap: wrap;">iperf3.exe -c 10.10.10.71 -V -t 60
C:\tmp\iperf-3.1.3-win64>iperf3.exe -c 10.10.10.71 -V -t 60
iperf 3.1.3
CYGWIN_NT-10.0 DESKTOP-QQRNKJQ 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64
Time: Sat, 16 Sep 2023 10:51:44 GMT
Connecting to host 10.10.10.71, port 5201
Cookie: DESKTOP-QQRNKJQ.1694861504.261775.29
TCP MSS: 0 (default)
[ 4] local 10.10.10.45 port 51794 connected to 10.10.10.71 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 60 second test
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 60.8 MBytes 509 Mbits/sec
[ 4] 1.00-2.00 sec 97.4 MBytes 817 Mbits/sec
[ 4] 2.00-3.00 sec 105 MBytes 880 Mbits/sec
[ 4] 3.00-4.00 sec 124 MBytes 1.04 Gbits/sec
[ 4] 54.00-55.00 sec 81.0 MBytes 680 Mbits/sec
[ 4] 55.00-56.00 sec 86.4 MBytes 723 Mbits/sec
[ 4] 56.00-57.00 sec 109 MBytes 915 Mbits/sec
[ 4] 57.00-58.00 sec 124 MBytes 1.04 Gbits/sec
[ 4] 58.00-59.00 sec 104 MBytes 875 Mbits/sec
[ 4] 59.00-60.00 sec 63.2 MBytes 530 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-60.00 sec 4.85 GBytes 694 Mbits/sec sender
[ 4] 0.00-60.00 sec 4.85 GBytes 694 Mbits/sec receiver
CPU Utilization: local/sender 30.0% (1.8%u/28.2%s), remote/receiver 2.9% (0.0%u/2.9%s)
iperf Done.
C:\tmp\iperf-3.1.3-win64>
</pre><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-9.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;"><br /></p><figure contenteditable="false" style="margin: 0px 21px 16px; padding: 0px; position: relative; text-align: center; white-space-collapse: preserve;"><div class="figure_wrapper" style="position: relative;"><img src="https://itproblog.ru/wp-content/uploads/2023/09/image-10.png" style="max-height: 690px; max-width: 100%; opacity: 1; transition: opacity 0.15s ease 0s; vertical-align: top;" /></div><figcaption class="editable_text" data-placeholder="Caption (optional)" dir="auto" style="color: #79828b; font-family: CustomSansSerif, "Lucida Grande", Arial, sans-serif; font-size: 15px; line-height: 18px; padding: 12px 21px 0px; vertical-align: top;"></figcaption></figure><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;">Тестирование пропускной способности канала связи завершено.</p><p dir="auto" style="counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; margin: 0px 21px 12px; overflow-wrap: break-word; padding: 0px; white-space-collapse: preserve;"><br style="color: rgba(0, 0, 0, 0.8); font-family: CustomSerif, Georgia, Cambria, "Times New Roman", serif; font-size: 18px;" /></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-51448472372113201082023-12-04T16:32:00.002+03:002023-12-04T16:32:21.877+03:00Задать фиксированый ip для пк на dhcp сервере. И запретить определенному маку получение ip.<p> </p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="400" src="https://www.youtube.com/embed/wB_hpKdCc7c" width="481" youtube-src-id="wB_hpKdCc7c"></iframe></div><br /><p></p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-29336388318526627352023-11-07T16:39:00.004+03:002023-11-07T16:39:57.217+03:00Использование маскарада с Iptables для трансляции сетевых адресов (NAT) MASQUERADE<p> </p><h2 style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 2rem; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px; text-align: justify;">Реализация маскарада с помощью Iptables</h2><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">Чтобы реализовать маскировку с помощью iptables, нам нужно добавить правило в одну из цепочек маршрутизации таблицы NAT. Цепочка постмаршрутизации используется для модификации пакетов, покидающих систему после того, как они были маршрутизированы.</p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;"><span style="box-sizing: border-box; font-weight: bolder;">Шаг 1. Добавление правила маскирования в цепочку POSTROUTING</span></p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">Выполните следующую команду в терминале Linux:</p><div class="codecolorer-container bash blackboard" style="background-color: #0c1021; border: 1px solid rgb(159, 159, 159); box-sizing: border-box; color: #f8f8f8; font-family: Monaco, "Lucida Console", monospace; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; margin-bottom: 10px; text-size-adjust: 100%; width: 920px;"><div class="bash codecolorer" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; padding: 5px; text-size-adjust: 100%;"><span class="co4" style="box-sizing: border-box; color: #aeaeae; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">$</span>iptables <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-t</span> nat <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-A</span> POSTROUTING <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-o</span> eth0 <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-j</span> MASQUERADE</div></div><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">Эта команда добавляет в цепочку POSTROUTING таблицы NAT правило, которое сопоставляет все исходящие пакеты, проходящие через интерфейс eth0, и заменяет их исходный IP-адрес на IP-адрес интерфейса eth0.</p><ul style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;"><li style="box-sizing: border-box; list-style-type: none; text-align: justify;"><ul style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li style="box-sizing: border-box; text-align: justify;"><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 1em;">Параметр -t используется для указания таблицы, с которой мы хотим работать, в данном случае это таблица NAT.</p></li><li style="box-sizing: border-box; text-align: justify;"><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 1em;">Опция -A используется для добавления нового правила в цепочку.</p></li><li style="box-sizing: border-box; text-align: justify;"><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 1em;">Опция -o используется для указания исходящего интерфейса, через который проходят пакеты.</p></li><li style="box-sizing: border-box; text-align: justify;"><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 1em;">Параметр -j используется для указания цели правила, которым в данном случае является MASQUERADE, что означает, что исходный IP-адрес пакета должен быть замаскирован.</p></li></ul></li></ul><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">После добавления этого правила исходный IP-адрес любого исходящего пакета, проходящего через интерфейс eth0, маскируется IP-адресом интерфейса eth0.</p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;"><img data-pagespeed-lsc-url="https://ru.linux-console.net/common-images/masquerade-with-iptables/Picture1-12.png" data-pagespeed-url-hash="2637879950" src="https://ru.linux-console.net/common-images/masquerade-with-iptables/Picture1-12.png" style="border: 1px solid gray; box-sizing: border-box; height: auto; margin-bottom: 20px; max-width: 100%; vertical-align: middle;" /></p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;"><span style="box-sizing: border-box; font-weight: bolder;">Шаг 2. Указание IP-адреса для маскировки</span></p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">По умолчанию правило маскировки применяется ко всем исходящим пакетам на всех интерфейсах. Однако можно указать конкретный интерфейс для маскировки с помощью параметра -s, за которым следует IP-адрес интерфейса.</p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">Выполните следующую команду:</p><div class="codecolorer-container bash blackboard" style="background-color: #0c1021; border: 1px solid rgb(159, 159, 159); box-sizing: border-box; color: #f8f8f8; font-family: Monaco, "Lucida Console", monospace; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; margin-bottom: 10px; text-size-adjust: 100%; width: 920px;"><div class="bash codecolorer" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; padding: 5px; text-size-adjust: 100%;"><span class="co4" style="box-sizing: border-box; color: #aeaeae; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">$</span>iptables <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-t</span> nat <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-A</span> POSTROUTING <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-s</span> 192.168.1.0<span class="sy0" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">/</span><span class="nu0" style="box-sizing: border-box; color: #d8fa3c; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">24</span> <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-o</span> eth1 <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-j</span> MASQUERADE</div></div><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;"><span style="box-sizing: border-box; font-weight: bolder;">Примечание</span>. Правило маскировки применяется только к пакетам, отправляемым через интерфейс eth1.</p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;"><span style="box-sizing: border-box; font-weight: bolder;">Шаг 3. Указание исходного IP-адреса для маскировки</span></p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">Правило маскировки заменяет исходный IP-адрес всех исходящих пакетов на IP-адрес исходящего интерфейса по умолчанию.</p><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;">Выполните следующую команду, чтобы указать другой исходный IP-адрес, используя параметр –to-source, за которым следует IP-адрес:</p><div class="codecolorer-container bash blackboard" style="background-color: #0c1021; border: 1px solid rgb(159, 159, 159); box-sizing: border-box; color: #f8f8f8; font-family: Monaco, "Lucida Console", monospace; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; margin-bottom: 10px; text-size-adjust: 100%; width: 920px;"><div class="bash codecolorer" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; padding: 5px; text-size-adjust: 100%;"><span class="co4" style="box-sizing: border-box; color: #aeaeae; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">$</span>iptables <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-t</span> nat <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-A</span> POSTROUTING <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-o</span> eth0 <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">--to-source</span> 203.0.113.1 <span class="re5" style="box-sizing: border-box; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 0.9rem; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: 1.3rem; text-size-adjust: 100%;">-j</span> MASQUERADE</div></div><p style="background-color: white; box-sizing: border-box; color: #212529; font-family: "Open Sans"; font-size: 16px; margin-bottom: 1rem; margin-top: 1em; text-align: justify;"><span style="box-sizing: border-box; font-weight: bolder;">Примечание</span>. Эта команда маскирует все исходящие пакеты с IP-адресом 203.0.113.1.</p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-64562731280694944962023-11-01T15:52:00.003+03:002023-11-01T16:45:15.137+03:00Batch Configuration - сброс пароля на камере Optimus<h1 class="entry-title" itemprop="headline" style="background-color: white; box-sizing: border-box; color: #111111; font-family: Montserrat, Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 2.4375em; line-height: 1.1; margin: 0.8em 0px 0.615385em;"><img alt="" class="attachment-reboot_standard size-reboot_standard wp-post-image" decoding="async" fetchpriority="high" height="400" itemprop="image" src="https://mixatronik.ru/wp-content/uploads/2023/03/2023-03-21_17-38-16-870x400.png" style="border-style: none; box-sizing: border-box; font-size: 16px; height: auto; max-width: 100%; vertical-align: bottom;" width="870" /></h1><div class="entry-image post-card post-card__thumbnail" style="-webkit-box-flex: 1; background-color: white; box-sizing: border-box; color: #111111; flex-basis: 0px; flex-grow: 1; font-family: Montserrat, Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 16px; margin: 0px auto 25px; max-width: 100%; position: relative;"><span class="post-card__category" style="background: rgb(77, 59, 254); border-radius: 1em; bottom: 15px; box-sizing: border-box; color: white; display: inline-block; font-size: 0.7em; left: 15px; margin-bottom: 1.2em; max-width: calc(100% - 30px); padding: 0.3em 1.4em; position: absolute; text-transform: uppercase; transform: translateZ(0px);"><a data-wpel-link="internal" href="https://mixatronik.ru/category/soft/utility" itemprop="articleSection" style="background-color: transparent; box-sizing: border-box; color: white; text-decoration-line: none;">УТИЛИТ</a></span></div><div class="entry-meta" style="-webkit-box-pack: justify; background-color: white; border-bottom: 3px solid rgb(242, 242, 242); box-sizing: border-box; color: #111111; display: flex; flex-wrap: wrap; font-family: Montserrat, Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 0.9em; font-weight: 700; justify-content: space-between; margin-bottom: 30px; padding-bottom: 20px;"><span class="entry-views" style="-webkit-box-flex: 0; box-sizing: border-box; flex: 0 0 auto; margin-bottom: 10px; max-width: 100%; padding-left: 3em; position: relative;"><span style="box-sizing: border-box; font-size: 16px; font-weight: bolder;">Batch Configuration</span><span style="font-size: 16px;"> она же </span><span style="box-sizing: border-box; font-size: 16px; font-weight: bolder;">BatchConfig Tool</span><span style="font-size: 16px;"> – это продвинутая версия </span><span style="box-sizing: border-box; font-size: 16px; font-weight: bolder;"><a data-wpel-link="internal" href="https://mixatronik.ru/soft/utility/sadp-tool" style="background-color: transparent; box-sizing: border-box; color: #111111;">SADP Tool</a></span><span style="font-size: 16px;">. Позволяет делать всё то же самое и ещё некоторые полезные вещи. Например, через </span><span style="box-sizing: border-box; font-size: 16px; font-weight: bolder;">Batch Configuration</span><span style="font-size: 16px;"> можно настраивать девайсы не заходя в их веб-морду. Часто это удобнее, т.к. нет заморочек с плагинами. К тому же, некоторые девайсы, как например мониторы видеодомофонов, не имеют веб-морды вовсе. И тут </span><span style="box-sizing: border-box; font-size: 16px; font-weight: bolder;">Batch</span><span style="font-size: 16px;"> незаменим. Правда, есть альтернатива – </span><span style="box-sizing: border-box; font-size: 16px; font-weight: bolder;">iVMS-4200</span><span style="font-size: 16px;">. Но это монстроподобный продукт и устанавливать его только ради настройки, думаю, не стоит</span></span></div><p><span style="background-color: white;">Запускаем программу в нижнем меню<br /><span face="Roboto, sans-serif" style="color: #333333;"><span style="font-size: 15px;">Через "Add" добавляем устройство, причем самое важное - достаточно вбить IP адрес камеры и все. Порт не трогаем, логин и пароль - вбиваем любую фигню, они не проверяются.</span></span></span></p><div style="background-color: white; color: #333333; font-family: Roboto, sans-serif; font-size: 15px;">Далее в верхнем меню выбираем камеру жмем System Config - Restore - Выбираем Simple Restore и потом Complite Restore, получаем "Configuration failed", но настройки на самом деле сбросились.</div><div style="background-color: white; color: #333333; font-family: Roboto, sans-serif; font-size: 15px;"><br /></div><div style="background-color: white; color: #333333; font-family: Roboto, sans-serif; font-size: 15px;">Камера перегружается и готово.</div>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-38378584220517746292023-10-27T14:29:00.001+03:002023-10-27T14:29:12.257+03:00Используем tcpdump для анализа и перехвата сетевого трафика<p> <img data-src="https://habrastorage.org/webt/_o/ek/-m/_oek-m4unfnewicejf6oee0sjmu.png" src="https://habrastorage.org/r/w1560/webt/_o/ek/-m/_oek-m4unfnewicejf6oee0sjmu.png" style="border-style: none; color: #f0f0f0; cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 0.75rem; font-style: italic; height: auto; margin: 0px; max-width: 100%; overflow: hidden; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; vertical-align: middle;" /></p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Утилита tcpdump — отличный инструмент командной, который способен перехватывать и анализировать сетевой трафик. Может оказаться большим подспорьем при решении сетевых проблем. Пакеты можно сохранить в файл и анализировать позже. Рекомендуется время от времени запускать эту утилиту, чтобы следить за своей сетью.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Содержание:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Вывод tcpdump</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Установка tcpdump</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Опции tcpdump</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтры tcpdump:<br style="quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="list-style-type: disc; margin-top: 9px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтр выражений</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтр портов</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтр хостов</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Комбинирование фильтров</li></ul></li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Сохранение заголовков в файл</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Просмотр сведений о пакете</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Вывод</li></ul><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h3 id="vyvod-tcpdump" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.4375rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Вывод tcpdump</h3><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Утилита tcpdump позволяет проверять заголовки пакетов TCP/IP и выводить одну строку для каждого из пакетов. Она будет делать это до тех пор, пока не нажать Ctrl + C.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Давайте рассмотрим одну строку из примера вывода:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">20:58:26.765637 IP 10.0.0.50.80 > 10.0.0.1.53181: Flags [F.], seq 1, ack 2, win 453, options [nop,nop,TS val 3822939 ecr 249100129], length 0</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Каждая строка включает:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Метка времени Unix (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">20: 58: 26.765637</span>)</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">протокол (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">IP</span>)</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">имя или IP-адрес исходного хоста и номер порта (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">10.0.0.50.80</span>)</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">имя хоста или IP-адрес назначения и номер порта (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">10.0.0.1.53181</span>)</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Флаги TCP (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Flags [F.]</span>). Указывают на состояние соединения и могут содержать более одного значения:<br style="quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="list-style-type: disc; margin-top: 9px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">o S — SYN. Первый шаг в установлении соединения</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">F — FIN. Прекращение соединения</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">— ACK. Пакет подтверждения принят успешно</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">P — PUSH. Указывает получателю обрабатывать пакеты вместо их буферизации</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">R — RST. Связь прервалась</li></ul></li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Порядковый номер данных в пакете. (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">seq 1</span>)</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Номер подтверждения. (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">ack 2</span>)</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Размер окна (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">win 453)</span>. Количество байтов, доступных в приемном буфере. Далее следуют параметры TCP</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Длина полезной нагрузки данных. (<span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">length 0</span>)</li></ul><a name="habracut" style="background-color: white; color: #548eaa; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"></a><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h3 id="ustanovka-tcpdump" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.4375rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Установка tcpdump</h3><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">В дистрибутивах на основе <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Debian</span> tcpdump можно установить с помощью команды APT:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># apt install tcpdump -y</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">В дистрибутивах на основе <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">RPM</span> tcpdump можно установить с помощью YUM:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># yum install tcpdump -y</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">В <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">RHEL 8</span> с использование <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">DNF</span>:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># dnf install tcpdump -y</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h3 id="opcii-tcpdump" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.4375rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Опции tcpdump</h3><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Запускать tcpdump нужно с правами root. Tcpdump включает в себя множество опций и фильтров. При запуске tcpdump без каких-либо параметров произойдет перехват всех пакетов, проходящих через интерфейс по умолчанию.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Вывести список доступных системе сетевых интерфейсов, в которых tcpdump может захватывать пакеты:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -D</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">или</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump --list-interfaces</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">1.eth0
2.nflog (Linux netfilter log (NFLOG) interface)
3.nfqueue (Linux netfilter queue (NFQUEUE) interface)
4.eth1
5.any (Pseudo-device that captures on all interfaces)
6.lo [Loopback]</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Очень полезно для систем, в которых нет команды для вывода списка интерфейсов.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Для захвата пакетов, проходящих через определенный интерфейс, используйте -i с именем интерфейса. Если не указать имя, тогда tcpdump подберет первый обнаруженный сетевой интерфейс.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -i eth1</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
01:06:09.278817 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 4761, seq 1, length 64
01:06:09.279374 IP 10.0.0.51 > vagrant-ubuntu-trusty-64: ICMP echo reply, id 4761, seq 1, length 64
01:06:10.281142 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 4761, seq 2, length 64</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-v увеличивает количество отображаемой информации о пакетах</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-vv дает еще более подробную информацию</li></ul><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><em style="quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">По умолчанию tcpdump преобразует IP-адреса в имена хостов, а также использует имена служб вместо номеров портов.</em></p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-n Если DNS не работает или вы не хотите, чтобы tcpdump выполнял поиск имени.</li></ul><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump –n</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
04:19:07.675216 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 2186733178:2186733278, ack 204106815, win 37232, length 100
04:19:07.675497 IP 10.0.2.2.50422 > 10.0.2.15.22: Flags [.], ack 100, win 65535, length 0
04:19:07.675747 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 100:136, ack 1, win 37232, length 36
04:19:07.675902 IP 10.0.2.2.50422 > 10.0.2.15.22: Flags [.], ack 136, win 65535, length 0
04:19:07.676142 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 136:236, ack 1, win 37232, length 100</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-c захватывает только набор строк, например, 5:</li></ul><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">#tcpdump -c 5</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">04:19:07.675216 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 2186733178:2186733278, ack 204106815, win 37232, length 100
04:19:07.675497 IP 10.0.2.2.50422 > 10.0.2.15.22: Flags [.], ack 100, win 65535, length 0
04:19:07.675747 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 100:136, ack 1, win 37232, length 36
04:19:07.675902 IP 10.0.2.2.50422 > 10.0.2.15.22: Flags [.], ack 136, win 65535, length 0
04:19:07.676142 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 136:236, ack 1, win 37232, length 100
5 packets captured</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-tttt для использования более удобных временных меток (по умолчанию используются временные метки Unix)</li></ul><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump –tttt</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">2020-07-06 04:30:12.203638 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 2186734102:2186734138, ack 204107103, win 37232, length 36
2020-07-06 04:30:12.203910 IP 10.0.2.2.50422 > 10.0.2.15.22: Flags [.], ack 36, win 65535, length 0
2020-07-06 04:30:12.204292 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 36:72, ack 1, win 37232, length 36
2020-07-06 04:30:12.204524 IP 10.0.2.2.50422 > 10.0.2.15.22: Flags [.], ack 72, win 65535, length 0
2020-07-06 04:30:12.204658 IP 10.0.2.15.22 > 10.0.2.2.50422: Flags [P.], seq 72:108, ack 1, win 37232, length 36</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h3 id="filtry-tcpdump" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.4375rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтры tcpdump</h3><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h4 id="filtr-vyrazheniy" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 16px; font-weight: 500; line-height: 1.25rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтр выражений</h4><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтр выражений выбирает, какие заголовки пакетов будут отображаться. Если фильтры не применяются, отображаются все заголовки пакетов.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Самые распространенные фильтры :</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">port</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">host</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">src</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">dst</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">tcp</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">udp</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">icmp</li></ul><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h4 id="filtr-portov" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 16px; font-weight: 500; line-height: 1.25rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтр портов</h4><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильт портов используется для просмотра пакетов, поступающих на определенный порт:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -i eth1 -c 5 port 80</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">23:54:24.978612 IP 10.0.0.1.53971 > 10.0.0.50.80: Flags [SEW], seq 53967733, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 256360128 ecr 0,sackOK,eol], length 0
23:54:24.978650 IP 10.0.0.50.80 > 10.0.0.1.53971: Flags [S.E], seq 996967790, ack 53967734, win 28960, options [mss 1460,sackOK,TS val 5625522 ecr 256360128,nop,wscale 6], length 0
23:54:24.978699 IP 10.0.0.1.53972 > 10.0.0.50.80: Flags [SEW], seq 226341105, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 256360128 ecr 0,sackOK,eol], length 0
23:54:24.978711 IP 10.0.0.50.80 > 10.0.0.1.53972: Flags [S.E], seq 1363851389, ack 226341106, win 28960, options [mss 1460,sackOK,TS val 5625522 ecr 256360128,nop,wscale 6], length 0 </code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h4 id="filtr-hostov" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 16px; font-weight: 500; line-height: 1.25rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтр хостов</h4><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Для перехвата пакетов, приходящих или исходящих от определенного хоста. Например, IP-адрес 10.0.2.15:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump host 10.0.2.15</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">03:48:06.087509 IP 10.0.2.15.22 > 10.0.2.2.50225: Flags [P.], seq 3862934963:3862934999, ack 65355639, win 37232, length 36
03:48:06.087806 IP 10.0.2.2.50225 > 10.0.2.15.22: Flags [.], ack 36, win 65535, length 0
03:48:06.088087 IP 10.0.2.15.22 > 10.0.2.2.50225: Flags [P.], seq 36:72, ack 1, win 37232, length 36
03:48:06.088274 IP 10.0.2.2.50225 > 10.0.2.15.22: Flags [.], ack 72, win 65535, length 0
03:48:06.088440 IP 10.0.2.15.22 > 10.0.2.2.50225: Flags [P.], seq 72:108, ack 1, win 37232, length 36</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Для перехвата пакетов определенных типов протоколов. Например, icmp, на интерфейсе eth1:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -i eth1 icmp</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">04:03:47.408545 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 2812, seq 75, length 64
04:03:47.408999 IP 10.0.0.51 > vagrant-ubuntu-trusty-64: ICMP echo reply, id 2812, seq 75, length 64
04:03:48.408697 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 2812, seq 76, length 64
04:03:48.409208 IP 10.0.0.51 > vagrant-ubuntu-trusty-64: ICMP echo reply, id 2812, seq 76, length 64
04:03:49.411287 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 2812, seq 77, length 64</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h4 id="kombinirovanie-filtrov" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 16px; font-weight: 500; line-height: 1.25rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Комбинирование фильтров</h4><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Фильтры можно комбинировать с помощью операторов:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">AND</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">OR</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">NOT</li></ul><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Это позволит писать команды, которые могут более точно изолировать пакеты. Например, пакеты с определенного IP-адреса и для определенного порта:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -n -i eth1 src 10.0.0.1 and dst port 80</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">00:18:17.155066 IP 10.0.0.1.54222 > 10.0.0.50.80: Flags [F.], seq 500773341, ack 2116767648, win 4117, options [nop,nop,TS val 257786173 ecr 5979014], length 0
00:18:17.155104 IP 10.0.0.1.54225 > 10.0.0.50.80: Flags [S], seq 904045691, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 257786173 ecr 0,sackOK,eol], length 0
00:18:17.157337 IP 10.0.0.1.54221 > 10.0.0.50.80: Flags [P.], seq 4282813257:4282813756, ack 1348066220, win 4111, options [nop,nop,TS val 257786174 ecr 5979015], length 499: HTTP: GET / HTTP/1.1
00:18:17.157366 IP 10.0.0.1.54225 > 10.0.0.50.80: Flags [.], ack 1306947508, win 4117, options [nop,nop,TS val 257786174 ecr 5983566], length 0</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Если нужно перехватить все пакеты кроме ICMP, используем оператор <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">NOT</span>:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -i eth1 not icmp</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h3 id="sohranenie-zagolovkov-v-fayl" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.4375rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Сохранение заголовков в файл</h3><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Вывод tcpdump может довольно быстро перемещаться по экрану. В таких случаях можно сохранить заголовки пакетов в файле с опцией <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-w</span>. Вывод сохраняется в файлы с расширением <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">.pcap</span>.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Следующая команда сохраняет 10 строк вывода интерфейса eth1 в icmp.pcap.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -i eth1 -c 10 -w icmp.pcap</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
10 packets captured
10 packets received by filter
0 packets dropped by kernel</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Прочитать этот файл можно с помощью опции <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-r</span></p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -i eth1 -c 10 -w icmp.pcap</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">reading from file icmp.pcap, link-type EN10MB (Ethernet)
05:33:20.852732 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 3261, seq 33, length 64
05:33:20.853245 IP 10.0.0.51 > vagrant-ubuntu-trusty-64: ICMP echo reply, id 3261, seq 33, length 64
05:33:21.852586 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 3261, seq 34, length 64
05:33:21.853104 IP 10.0.0.51 > vagrant-ubuntu-trusty-64: ICMP echo reply, id 3261, seq 34, length 64
05:33:22.852615 IP vagrant-ubuntu-trusty-64 > 10.0.0.51: ICMP echo request, id 3261, seq 35, length 64</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h3 id="prosmotr-svedeniy-o-pakete" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.4375rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Просмотр сведений о пакете</h3><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Пока мы видели только заголовки пакетов, а для просмотра содержимого нужно использовать параметр <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-A</span>. Вывод содержимого будет в формате ASCII.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">С помощью опции <span style="-webkit-font-smoothing: antialiased; font-weight: bolder; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">-X</span> можно отобразить вывод в шестнадцатеричном формате, правда, это не сильно помогает в тех случаях, когда соединение зашифровано.</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;"># tcpdump -c10 -i eth1 -n -A port 80</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><pre style="background: rgb(247, 247, 247); border-radius: 4px; border: 1px solid rgb(240, 240, 240); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 0.875rem; line-height: 1.6; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 17px 20px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal;"><code class="plaintext hljs" style="background: none; border-radius: 4px; color: #4d4d4c; display: block; font-family: Menlo, Monaco, Consolas, "Courier New", Courier, monospace; font-size: inherit; overflow-wrap: normal; overflow-x: auto; padding: 0px; quotes: "«" "»"; tab-size: 4; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s; word-break: normal; word-spacing: normal;">23:35:53.109306 IP 10.0.0.1.53916 > 10.0.0.50.80: Flags [P.], seq 2366590408:2366590907, ack 175457677, win 4111, options [nop,nop,TS val 255253117 ecr 5344866], length 499: HTTP: GET / HTTP/1.1
E..'..@.@.%.
...
..2...P..M.
uE............
.6.}.Q.bGET / HTTP/1.1
Host: 10.0.0.50
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
If-Modified-Since: Tue, 04 Mar 2014 11:46:45 GMT</code></pre><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><h3 id="vyvod" style="-webkit-font-smoothing: antialiased; background-color: white; color: #333333; font-family: "Fira Sans", sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.4375rem; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Вывод</h3><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><p style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">Утилита tcpdump проста в настройке и освоении. Необходимо лишь немного разобраться с:</p><br style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;" /><ul style="background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; padding-inline-start: 32px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;"><li style="line-height: 1.6; margin: 0px 0px 6px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">выводом</li><li style="line-height: 1.6; margin: 6px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">фильтрами</li><li style="line-height: 1.6; margin: 6px 0px 0px; padding: 0px; quotes: "«" "»"; transition: opacity 0.2s ease-in-out 0s, color 0.2s ease-in-out 0s, text-decoration 0.2s ease-in-out 0s, background-color 0.2s ease-in-out 0s, -webkit-text-decoration 0.2s ease-in-out 0s;">опциями</li><li></li></ul>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-85710026563313230532023-10-17T10:32:00.005+03:002023-10-17T10:32:43.681+03:00Squid ошибка: "FATAL: mimeLoadIcon: cannot parse internal URL: http://ubuntuserver:0/squid-internal-static/icons/silk/image.png"<p><span style="font-family: monospace;"><span style="background-color: white; color: #ff5454; font-weight: bold;">×</span><span style="background-color: white;"> squid.service - Squid Web Proxy Server
</span><br /> Loaded: loaded (/lib/systemd/system/squid.service; <span style="background-color: white; color: #54ff54; font-weight: bold;">enabled</span><span style="background-color: white;">; preset: </span><span style="background-color: white; color: #54ff54; font-weight: bold;">enabled</span><span style="background-color: white;">)
</span><br /> Active: <span style="background-color: white; color: #ff5454; font-weight: bold;">failed</span><span style="background-color: white;"> (Result: exit-code) since Tue 2023-10-17 07:28:58 UTC; 1s ago
</span><br /> Docs: man:squid(8)
<br /> Process: 1593 ExecStartPre=/usr/sbin/squid --foreground -z (code=exited, status=0/SUCCESS)
<br /> Process: 1596 ExecStart=/usr/sbin/squid --foreground -sYC <span style="background-color: white; color: #ff5454; font-weight: bold;">(code=exited, status=1/FAILURE)</span><span style="background-color: white;">
</span><br /> Main PID: 1596 (code=exited, status=1/FAILURE)
<br /> CPU: 400ms
<br />
<br />Oct 17 07:28:58 ubuntuserver squid[1610]: <span style="background-color: white; color: #ff5454; font-weight: bold;">FATAL: mimeLoadIcon: cannot parse internal URL: http://ubuntuserver:0/squid-internal-static/icons/silk/image.png</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver squid[1610]: <span style="background-color: white; color: #d7d75f; font-weight: bold;">Squid Cache (Version 6.1): Terminated abnormally.</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver squid[1596]: <span style="background-color: white; font-weight: bold;">Squid Parent: squid-1 process 1610 exited with status 1</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver squid[1596]: <span style="background-color: white; font-weight: bold;">Squid Parent: squid-1 process 1610 will not be restarted for 3600 seconds due to repeated, frequent failures</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver squid[1596]: <span style="background-color: white; color: #ff5454; font-weight: bold;">Exiting due to repeated, frequent failures</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver squid[1596]: <span style="background-color: white; font-weight: bold;">Removing PID file (/run/squid.pid)</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver systemd[1]: <span style="background-color: white; font-weight: bold;">squid.service: Main process exited, code=exited, status=1/FAILURE</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver systemd[1]: <span style="background-color: white; font-weight: bold;">squid.service: Killing process 1611 (squid) with signal SIGKILL.</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver systemd[1]: <span style="background-color: white; color: #d7d75f; font-weight: bold;">squid.service: Failed with result 'exit-code'.</span><span style="background-color: white;">
</span><br />Oct 17 07:28:58 ubuntuserver systemd[1]: <span style="background-color: white; color: #ff5454; font-weight: bold;">Failed to start squid.service - Squid Web Proxy Server.</span><br /></span></p><p><span style="background-color: #f7f7f7; font-family: "Ubuntu Beta", UbuntuBeta, Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif; font-size: 14px;">Проблема в этой строчке:</span></p><span style="background-color: #f7f7f7; font-family: "Ubuntu Beta", UbuntuBeta, Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif; font-size: 14px;">http_port 3128</span><br style="background-color: #f7f7f7; font-family: "Ubuntu Beta", UbuntuBeta, Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif; font-size: 14px; margin: 0px; padding: 0px;" /><span style="background-color: #f7f7f7; font-family: "Ubuntu Beta", UbuntuBeta, Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif; font-size: 14px;">http_port 3129 intercept</span><br style="background-color: #f7f7f7; font-family: "Ubuntu Beta", UbuntuBeta, Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif; font-size: 14px; margin: 0px; padding: 0px;" /><br style="background-color: #f7f7f7; font-family: "Ubuntu Beta", UbuntuBeta, Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif; font-size: 14px; margin: 0px; padding: 0px;" /><span style="background-color: #f7f7f7; font-family: "Ubuntu Beta", UbuntuBeta, Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif; font-size: 14px;">Если указать один порт, Squid не подтягивает картинки и прочее, чтобы отображать страницы ошибок. А с прозрачного порта подтянуть не может.</span>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0tag:blogger.com,1999:blog-7622156039663595675.post-8962285483895128962023-10-13T10:56:00.004+03:002023-10-13T11:48:30.981+03:00Блокировка нужного сайта через /etc/hosts в Ubuntu<p style="background-color: #f2f3f5; color: rgba(0, 0, 0, 0.8); font-family: "YS Text", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 0px 0px 16px; padding: 0px;">– Откройте файл /etc/hosts с помощью редактора, например, nano:</p><pre style="background-color: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.8); font-size: 16px; line-height: 1.5; margin-bottom: 16px; margin-top: 0px; overflow-x: auto; padding: 16px;"><code style="font-size: inherit; line-height: 1.5;">sudo nano /etc/hosts
</code></pre><p style="background-color: #f2f3f5; color: rgba(0, 0, 0, 0.8); font-family: "YS Text", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 0px 0px 16px; padding: 0px;">– Добавьте IP-адрес сайта, который вы хотите заблокировать, и его доменное имя в следующем формате:</p><pre style="background-color: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.8); font-size: 16px; line-height: 1.5; margin-bottom: 16px; margin-top: 0px; overflow-x: auto; padding: 16px;"><code style="font-size: inherit; line-height: 1.5;">IP_адрес домен_имя
</code></pre><p style="background-color: #f2f3f5; color: rgba(0, 0, 0, 0.8); font-family: "YS Text", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 0px 0px 16px; padding: 0px;">Например, если вы хотите заблокировать сайт <a href="http://www.example.com/" rel="noopener" target="_blank">www.example.com</a>, добавьте следующую строку:</p><pre style="background-color: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.8); font-size: 16px; line-height: 1.5; margin-bottom: 16px; margin-top: 0px; overflow-x: auto; padding: 16px;"><code style="font-size: inherit; line-height: 1.5;">127.0.0.1 www.example.com
</code></pre><p style="background-color: #f2f3f5; color: rgba(0, 0, 0, 0.8); font-family: "YS Text", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 0px; padding: 0px;">Теперь, когда пользователь пытается открыть сайт <a href="http://www.example.com/" rel="noopener" target="_blank">www.example.com</a> в браузере, его запрос будет перенаправлен на локальный IP-адрес (127.0.0.1), что приведет к ошибке подключения.</p>Admi0nhttp://www.blogger.com/profile/03538610369957360167noreply@blogger.com0