<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://support.qbpro.ru/index.php?action=history&amp;feed=atom&amp;title=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA_%D0%B8_%D0%BE%D0%B1%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_P2P_%D1%82%D1%80%D0%B0%D1%84%D0%B8%D0%BA%D0%B0</id>
	<title>Поиск и обработка P2P трафика - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://support.qbpro.ru/index.php?action=history&amp;feed=atom&amp;title=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA_%D0%B8_%D0%BE%D0%B1%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_P2P_%D1%82%D1%80%D0%B0%D1%84%D0%B8%D0%BA%D0%B0"/>
	<link rel="alternate" type="text/html" href="https://support.qbpro.ru/index.php?title=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA_%D0%B8_%D0%BE%D0%B1%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_P2P_%D1%82%D1%80%D0%B0%D1%84%D0%B8%D0%BA%D0%B0&amp;action=history"/>
	<updated>2026-04-03T23:29:29Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.38.1</generator>
	<entry>
		<id>https://support.qbpro.ru/index.php?title=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA_%D0%B8_%D0%BE%D0%B1%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_P2P_%D1%82%D1%80%D0%B0%D1%84%D0%B8%D0%BA%D0%B0&amp;diff=2101&amp;oldid=prev</id>
		<title>imported&gt;Vix в 23:13, 8 января 2017</title>
		<link rel="alternate" type="text/html" href="https://support.qbpro.ru/index.php?title=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA_%D0%B8_%D0%BE%D0%B1%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_P2P_%D1%82%D1%80%D0%B0%D1%84%D0%B8%D0%BA%D0%B0&amp;diff=2101&amp;oldid=prev"/>
		<updated>2017-01-08T23:13:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 02:13, 9 января 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l65&quot;&gt;Строка 65:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 65:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://habrahabr.ru/sandbox/20508/ взято тут]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://habrahabr.ru/sandbox/20508/ взято тут]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://www.opennet.ru/tips/2239_l7_netfilter_linux.shtml?skip=-5 и еще..]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pgdb4support-mediawiki-:diff::1.12:old-2100:rev-2101 --&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Vix</name></author>
	</entry>
	<entry>
		<id>https://support.qbpro.ru/index.php?title=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA_%D0%B8_%D0%BE%D0%B1%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_P2P_%D1%82%D1%80%D0%B0%D1%84%D0%B8%D0%BA%D0%B0&amp;diff=2100&amp;oldid=prev</id>
		<title>imported&gt;Vix: Новая страница: «Пиринговая сеть ('''P2P''' от англ. peer-to-peer – равный к равному) – это компьютерная сеть, основ…»</title>
		<link rel="alternate" type="text/html" href="https://support.qbpro.ru/index.php?title=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA_%D0%B8_%D0%BE%D0%B1%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_P2P_%D1%82%D1%80%D0%B0%D1%84%D0%B8%D0%BA%D0%B0&amp;diff=2100&amp;oldid=prev"/>
		<updated>2017-01-08T23:10:06Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «Пиринговая сеть (&amp;#039;&amp;#039;&amp;#039;P2P&amp;#039;&amp;#039;&amp;#039; от англ. peer-to-peer – равный к равному) – это компьютерная сеть, основ…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Пиринговая сеть ('''P2P''' от англ. peer-to-peer – равный к равному) – это компьютерная сеть, основанная на равноправии участников. В такой сети отсутствуют выделенные серверы, а каждый узел является как сервером так и клиентом одновременно. Такая организация сети позволяет сохранить работоспособность при любом количестве и любом сочетании доступных узлов.&lt;br /&gt;
&lt;br /&gt;
Иногда приходится отфильтровать и блокировать трафик пиринговых сетей, таких например как BitTorrent и eDonkey. Я думаю это головная боль не одного системного администратора так как в большинстве случаев заблокировать его не так то просто как может показаться на первый взгляд. Зачастую этот трафик не привязывается к определенному порту, поэтому появляется необходимость искать более интеллектуальные способы определения трафика нежели просто блокирование одного порта на фаерволе. Здесь описан модуль к iptables который автоматически обнаруживает сигнатуру пирингового трафика, который в дальнейшем можно блокировать. Модуль называется ipp2p&lt;br /&gt;
&lt;br /&gt;
'''Ipp2p'''&lt;br /&gt;
&lt;br /&gt;
 iptables -i eth0 -A FORWARD -m ipp2p --ipp2p -j LOG --log-level=6 --log-prefix “p2p_net: ” &amp;quot;ipp2p: &amp;quot;&lt;br /&gt;
 iptables -i eth0 -A FORWARD -m ipp2p --ipp2p -j DROP&lt;br /&gt;
 iptables -i eth0 -A FORWARD -p udp -m ipp2p --bit -j DROP&lt;br /&gt;
 iptables -i eth0 -A FORWARD -p tcp -m ipp2p --edk -j DROP&lt;br /&gt;
&lt;br /&gt;
Перейду ближе к установке&lt;br /&gt;
Что имеется:&lt;br /&gt;
Операционная система: Ubuntu 10.04 server LTS (Ядро версии 2.6.32.24)&lt;br /&gt;
Фаервол: iptables v 1.4.6 (По умолчанию стоит фаервол версии 1.4.4, я обновил его используя исходники с официального сайта)&lt;br /&gt;
К сожалению, исходный код модуля, уже давно не поддерживается и те кто будут пытаться установить код на новых версиях ядра (более 2.6.22) получат нижеследующую ошибку:&lt;br /&gt;
&lt;br /&gt;
 router:~# /ipp2p-0.8.2$ make&lt;br /&gt;
 Makefile:36: You need to install iptables sources and maybe set IPTABLES_SRC&lt;br /&gt;
 make -C /lib/modules/2.6.26-2-686/build SUBDIRS=/root/ipp2p-0.8.2 modules&lt;br /&gt;
 make[1]: Entering directory `/usr/src/linux'&lt;br /&gt;
 CC [M] /root/ipp2p-0.8.2/ipt_ipp2p.o&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c: In function 'match':&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:751: error: 'const struct sk_buff' has no member named 'nh'&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c: At top level:&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:871: warning: initialization from incompatible pointer type&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:874: warning: initialization from incompatible pointer type&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c: In function 'init':&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:883: error: implicit declaration of function 'ipt_register_match'&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c: In function 'fini':&lt;br /&gt;
 /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:888: error: implicit declaration of function 'ipt_unregister_match'&lt;br /&gt;
 make[2]: *** [/usr/src/ipp2p-0.8.2/ipt_ipp2p.o] Error 1&lt;br /&gt;
&lt;br /&gt;
Проблема заключается в больших изменениях в ядре ABI. И к счастью, эти изменения не так обширны, чтобы нельзя было изменить ipp2p, так чтобы он не мог работать на новых версиях ядра. Существует патченная версия для новых ядер. Скачать можно [http://burnachurch.com/download/5/ отсюда] &lt;br /&gt;
&lt;br /&gt;
'''Установка'''&lt;br /&gt;
&lt;br /&gt;
Необходимо скачать исходные коды ядра, заголовочные файлы и исходные коды iptables`а. Как вы их будете получать оставляю за вашей совестью, главное, чтобы они были и были рабочими.&lt;br /&gt;
&lt;br /&gt;
 tar zxfv ipp2p-0.8.2+2.6.22.tar.gz&lt;br /&gt;
 cd ipp2p-0.8.2-patch&lt;br /&gt;
&lt;br /&gt;
Здесь необходимо подправить файл Makefile, где необходимо указать пути к исходным файлам ядра и фаервола.&lt;br /&gt;
Чтобы избежать ошибки (kernel: ip_tables: ipp2p match: invalid size 16 != 8) которая возникает после установки модуля необходимо в файле ipt_ipp2p.c закоментировать строки с 838 по 841:&lt;br /&gt;
&lt;br /&gt;
 struct ipp2p_match_info {&lt;br /&gt;
 long int dunno_what_this_is_for;&lt;br /&gt;
 long int i_also_dunno_what_this_is_for;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
и заменить строку 861:&lt;br /&gt;
 .matchsize = sizeof(struct ipp2p_match_info),&lt;br /&gt;
на&lt;br /&gt;
 .matchsize = XT_ALIGN(sizeof(struct ipt_p2p_info)),&lt;br /&gt;
&lt;br /&gt;
На этом изменения заканчиваются.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 cp ipt_ipp2p.ko /lib/modules/`uname -r`/kernel/net/ipv4/ &lt;br /&gt;
 cp libipt_ipp2p.so /lib/xtables/&lt;br /&gt;
 depmod -a&lt;br /&gt;
 modprobe ipt_ipp2p&lt;br /&gt;
&lt;br /&gt;
Модуль загружен! Можно работать с P2P трафиком.&lt;br /&gt;
&lt;br /&gt;
* [https://habrahabr.ru/sandbox/20508/ взято тут]&lt;/div&gt;</summary>
		<author><name>imported&gt;Vix</name></author>
	</entry>
</feed>