DOI :: I2P over Yggdrasil: анонімність у меш-мережах | I2P (Invisible Internet Protocol) – вільний інструмент для організації анонімних комунікацій через інтернет.

 


I2P over Yggdrasil: анонімність у меш-мережах

Грабовий
хв

I2P (Invisible Internet Protocol) – вільний інструмент для організації анонімних комунікацій через інтернет. Є одноранговою мережею, у якій кожен користувач за промовчанням є потенційною ланкою в анонімному ланцюжку інших учасників мережі. Трафік I2P зашифрований та не піддається аналізу. Поняття «сторожового» вузла в I2P, яке є у мережі Tor, немає: немає постійного вузла, через який здійснюється вихід у мережу. Взаємодія користувача з I2P на стороні домашнього провайдера ідентифікується як хаотичне підключення до випадкових хостів. Кількість підключень клієнта з білим IP в середньому варіюється біля позначки чотири тисячі. Окрім корисного навантаження, сюди входять обмін службовою інформацією з іншими роутерами мережі та транзитний трафік.

Передумови

Істотне слабке місце мережі I2P полягає у необхідності звернення до одного із стартових вузлів через звичайний інтернет при першому запуску. Пакет з початковим малюнком мережі у вигляді кількох випадкових роутерів та вузол, що його віддає, називаються ресидом. Стартові вузли тримають ентузіасти, їх список є в загальному доступі і нерідко зазнає змін через звичайні людські обставини. Пляшкова шийка полягає в можливості на стороні провайдера ідентифікувати більшість звернень до ресиду через моніторинг DNS-запитів, а також блокування доменів стартових вузлів, що ускладнить перший запуск для недосвідченого користувача, т.к. вимагатиме використання проксі або VPN.

Блокування запиту до ресида на стороні провайдера
Блокування запиту до ресида на стороні провайдера

На відміну від звичайного інтернету, користувачі I2P без виділеної адреси мають гіршу якість використання прихованої мережі ніж абоненти з білим IP. Це з постійною необхідністю прямого повідомлення з іншими роутерами мережі. Кожен роутер публікує свою адресу, яка включає ключі шифрування, IP-адресу і порт для прийому повідомлень. Очевидно, що достукатися до вузла мережі за NAT-сервером – завдання не просто.

Різниця між користувачем із виділеним IP та користувачем за NAT-ом
Різниця між користувачем із виділеним IP та користувачем за NAT-ом

Однак робота роутерів без виділеної адреси можлива: клієнту мережі за NAT-ом доводиться постійно підтримувати активне UDP-з'єднання, резервуючи на вихідному сервері провайдера порт, звернення на який буде передано клієнту. Цей сценарій дуже складний, особливо коли мова заходить про ініціалізацію з'єднання ззовні. Механіка роботи клієнта за NAT-ом – твір інженерної думки, який заслуговує на окрему статтю.

Кратко об Yggdrasil

Yggdrasil Network – один із небагатьох працездатних протоколів меш-мереж. Основна концепція полягає в автоматичній маршрутизації у внутрішній IPv6 підмережі (200::/7) та абсолютній масштабованості. Yggdrasil є повністю одноранговою мережею: немає жодних «майстер-вузлів», яким делегується якась глобальна відповідальність. Є ідеологічним продовженням проекту CJDNS (Hyperborea).

Абстрактна ідея меш-сети на чільне місце ставить продуктивність, приватність і простоту використання: шифрування трафіку і низький поріг входження нових користувачів. Yggdrasil є інструментом анонімності, т.к. Найближчі до користувача вузли бачать його реальні мережеві інтерфейси в локальній мережі, або IP-адреса при підключенні до публічного бенкету через інтернет. Меш-мережі знаходять застосування в організації псевдолокальних мереж, поєднуючи віддалені комп'ютери в одну IPv6-мережу (за аналогією з Hamachi для гри в Minecraft та інші мультиплеєрні ігри). Також служить для організації інших внутрішньомережевих ресурсів на кшталт сайтів та VoIP-телефонії.

Перші спроби інтеграції

Невелике зауваження

I2P-роутер публікує свої адреси, у тому числі IPv6, якщо він увімкнений у конфізі і є фактично. Оскільки Yggdrasil надає користувачеві не локальний проксі, а повноцінний мережевий інтерфейс (використовуючи драйвер TUN від WireGuard), донедавна I2P-роутер публікував адресу IPv6 з підмережі Yggdrasil. Оскільки користувачів з увімкненим протоколом IPv6 у конфігурації I2P-роутера та встановленим Yggdrasil було більше, ніж один і навіть два, періодично можна було бачити, що клієнт I2P (роутер) повідомляється з іншими Yggdrasil-адресами.

Проте в наявності такі недоліки:

  1. звернення до ресиду зрештою має здійснюватися через звичайний інтернет;

  2. опублікована роутером адреса IPv6-Yggdrasil для переважної більшості користувачів I2P є невідомою та недоступною;

  3. успішний запуск I2P-роутера на Yggdrasil-Only пристрої малоймовірний через можливу відсутність у ресиді або локальній базі роутера вузлів з адресою IPv6-Yggdrasil.

Початок повної сумісності

З версії 2.36.0 i2pd має кілька нових параметрів конфігурації, головний з яких meshnets.yggdrasil=trueЦей параметр не залежить від конфігурації IPv4 та IPv6. Зокрема реальні мережеві інтерфейси можуть бути відключені. У такому разі I2P-роутер працюватиме в режимі Yggdrasil-Only.

Також організований спеціальний ресид, доступний з Yggdrasil і пакет, що віддає користувачеві, в першу чергу складається з відомих роутерів з адресою IPv6-Yggdrasil. При кожному запуску I2P-роутера, працюючого як Yggdrasil-Only, проводиться перевірка наявності у локальній базі доступних вузлів на транспортному рівні, тобто. наявність інших вузлів з IPv6-Yggdrasil. Якщо з якихось причин сумісних роутерів у локальній базі не було, відбувається повторне звернення до Yggdrasil-ресиду.

При сучасному використанні Yggdrasil здебільшого через оверлейні підключення до публічних бенкетів через інтернет, робота I2P-роутера в Yggdrasil можна порівняти зі зв'язкою “Tor-over-VPN”: подібний підхід повністю приховує факт використання прихованої мережі від домашнього провайдера. У випадку з I2P є ще одна специфічна перевага: користувачу не потрібно мати виділений IP-провайдера для безпроблемних зовнішніх звернень, т.к. IPv6-Yggdrasil є глобально доступним у рамках сегменту мережі Yggdrasil (фізично з'єднаної групи учасників, у тому числі через публічні бенкети в інтернеті).

Цілісність мережі

Описане рішення є чинником фрагментації I2P. Побудова тунелів прихованої мережі – дуже ємний і навіть ювелірний процес, в рамках якого, зокрема, відбувається узгодження транспортних можливостей вузлів. Формуючи «часник» – зашифроване повідомлення групі вузлів, які мають утворити тунель, – роутер перевіряє їхні адреси на сумісність. Наприклад, вузол з єдиною адресою IPv4 не отримає інструкцію, згідно з якою необхідно встановити контакт з адресою IPv6, т.к. це свідомо неможливо.

Щоб Yggdrasil-Only роутеру побудувати тунель до вузла з адресою зі звичайного інтернету, як мінімум буде підібраний транзитний роутер, який має два інтерфейси: IPv6-Yggdrasil і, наприклад, звичайний IPv4. У свою чергу, інші Yggdrasil-Only роутери можуть виступати транзитними ланками тунелю, але тільки для сполучення з вузлами сумісними по транспорту, тобто. також мають мережевий інтерфейс Yggdrasil. Чим більше в мережі I2P кількість роутерів з одночасно включеними IPv4, IPv6 та Yggdrasil інтерфейсами, тим зв'язніша мережа.

Подключение к I2P через Yggdrasil
Подключение к I2P через Yggdrasil

Перспектива

Приклад з Yggdrasil є приватним кроком у майбутнє, а не самоціллю. Описаний досвід успішної інтеграції прихованої мережі в меш-мережа є важливим концептуальним кроком, який за потреби дозволить інтегрувати мережу I2P в інші меш-мережі. Перспектива відкривається під час розгляду самоорганізованих сегментів меш-сети, наприклад, у багатоквартирних будинках без централізованого провайдера. У локальній мережі клієнт Yggdrasil автоматично знаходить інші вузли і повідомляється з ними, сам виступаючи за потреби транзитним. При підключенні хоча б одного вузла в такому сегменті до іншого сегменту мережі (наприклад, глобального через інтернет), мережі автоматично об'єднуються. Такий підхід до організації мережі став реальнішим, т.к. тепер має місце і друга сторона звичного інтернету – прихована.


Для більш детального ознайомлення зі згаданими технологіями, рекомендую статті: про I2P та про Yggdrasil .


I2P over Yggdrasil: anonymity in mesh networks

Hornbeam
6 min

I2P (Invisible Internet Protocol) is a free tool for organizing anonymous communications over the Internet. It is a peer-to-peer network in which each user by default is a potential link in an anonymous chain of other network participants. I2P traffic is encrypted and cannot be analyzed. The concept of a "sentry" node in I2P, which is present in the Tor network, is not: there is no permanent node through which access to the network is carried out. User interaction with I2P on the side of the home provider is identified as a chaotic connection to random hosts. The number of client connections with a white IP varies on average around the four thousand mark. In addition to the payload, this includes the exchange of service information with other network routers and transit traffic.

Prerequisites

A significant weakness of the I2P network is the need to access one of the start nodes via the regular Internet at the first start. A packet with an initial network pattern in the form of several random routers and a node that sends it is called a recid. Starting nodes are kept by enthusiasts, their list is publicly available and often undergoes changes due to normal human circumstances. The bottleneck lies in the ability on the provider's side to identify most requests to reseed through monitoring DNS queries, as well as in blocking the domains of start nodes, which will make it difficult for an inexperienced user to start the first time, because. require the use of a proxy or VPN.

Blocking a request to a resource on the provider's side
Blocking a request to a resource on the provider's side

Unlike regular Internet, I2P users without a dedicated address have a worse quality of use of the hidden network than subscribers with a white IP. This is due to the constant need for direct communication with other network routers. Each router publishes its address, which includes the encryption keys, IP address, and port for receiving messages. Obviously, reaching a network node behind a NAT server is not an easy task.

The difference between a user with a dedicated IP and a user behind a NAT
The difference between a user with a dedicated IP and a user behind a NAT

However, the operation of routers without a dedicated address is possible: a network client behind a NAT has to constantly maintain an active UDP connection, reserving a port on the provider's output server, requests to which will be transferred to the client. This scenario is quite complex, especially when it comes to initializing the connection from the outside. The mechanics of the client behind NAT is a work of engineering that deserves a separate article.

Briefly about Yggdrasil

Yggdrasil Network is one of the few working mesh networking protocols. The main concept is automatic routing on the internal IPv6 subnet (200::/7) and absolute scalability. Yggdrasil is completely peer-to-peer: there are no "master nodes" to which any global responsibility is delegated. It is an ideological continuation of the CJDNS (Hyperborea) project.

The abstract idea of ​​the mesh network puts performance, privacy and ease of use at the forefront: traffic encryption and a low entry threshold for new users. Yggdrasil is not an anonymity tool because the nodes closest to the user see his real network interfaces on the local network, or the IP address when connecting to a public peer via the Internet. Mesh networks are used in the organization of pseudo-local networks, combining remote computers into one IPv6 network (similar to Hamachi for playing Minecraft and other multiplayer games). It also serves to organize other intranet resources like websites and VoIP-telephony.

First attempts at integration

A small note

The I2P router publishes its addresses, including IPv6, if it is enabled in the config and is actually available. Since Yggdrasil does not provide the user with a local proxy, but a full-fledged network interface (using the TUN driver from WireGuard), until recently, the I2P router published the IPv6 address from the Yggdrasil subnet. Since there were more than one or even two users with IPv6 enabled in the I2P router configuration and Yggdrasil installed, it was periodically possible to see that the I2P client (router) communicates with other Yggdrasil addresses.

However, there are the following shortcomings:

  1. Resid should ultimately be accessed via the regular Internet;

  2. the IPv6-Yggdrasil address published by the router is unknown and inaccessible to the vast majority of I2P users;

  3. successful launch of an I2P router on a Yggdrasil-Only device is unlikely due to the possible absence of nodes with an IPv6-Yggdrasil address in the reseed or local database of the router.

The beginning of full compatibility

Since version 2.36.0 i2pd has several new configuration options, the main one being meshnets.yggdrasil=trueThis setting is independent of the IPv4 and IPv6 configuration. In particular, real network interfaces can be disabled. In this case, the I2P router will operate in Yggdrasil-Only mode.

A special reseed is also organized, accessible from Yggdrasil and giving the user a package primarily consisting of known routers with an IPv6-Yggdrasil address. Each time an I2P router running in Yggdrasil-Only mode is started, a check is made to see if the local database contains available nodes at the transport level, i.e. the presence of other nodes with IPv6-Yggdrasil. If for some reason there are no compatible routers in the local database, the Yggdrasil-resid is re-accessed.

With modern use of Yggdrasil mostly through overlay connections to public peers via the Internet, the operation of an I2P router in Yggdrasil is comparable to a “Tor-over-VPN” bundle: this approach completely hides the fact of using a hidden network from the home provider. In the case of I2P, there is another specific advantage: the user does not need to have a dedicated IP from the ISP for trouble-free external calls, because. IPv6-Yggdrasil is globally available within the Yggdrasil network segment (a physically connected group of participants, including through public Internet peers).

Network integrity

The described solution is not an I2P fragmentation factor. The construction of hidden network tunnels is a very capacious and even jeweler process, within the framework of which, among other things, the transport capabilities of the nodes are coordinated. Forming a "garlic" - an encrypted message to a group of nodes that should form a tunnel - the router checks their addresses for compatibility. For example, a host with a single IPv4 address would not receive an instruction to contact an IPv6 address, because this is obviously impossible.

In order for the Yggdrasil-Only router to build a tunnel to a node with an address from the regular Internet, at least a transit router will be selected that has two interfaces: IPv6-Yggdrasil and, for example, regular IPv4. In turn, other Yggdrasil-Only routers can also act as transit links of the tunnel, but only for communication with transport-compatible nodes, i.e. also having a Yggdrasil network interface. The more routers in the I2P network with simultaneously enabled IPv4, IPv6 and Yggdrasil interfaces, the more connected the network.

Connection to I2P via Yggdrasil
Connection to I2P via Yggdrasil

Prospect

The Yggdrasil example is a private step into the future, not an end in itself. The described experience of successfully integrating a hidden network into a mesh network is an important conceptual step, which, if necessary, will allow the integration of the I2P network into other mesh networks. The perspective is opened when considering self-organized segments of the mesh network, for example, in apartment buildings without a centralized provider. On the local network, the Yggdrasil client automatically finds other nodes and communicates with them, acting as a transit itself if necessary. When at least one node in such a segment is connected to another network segment (for example, to the global one via the Internet), the networks are automatically combined. This approach to organizing a network has become even more realistic, because. now there is a second side of the usual Internet - hidden.


For a more detailed acquaintance with the mentioned technologies, I recommend articles: about I2P and about Yggdrasil .

Просмотры:

Коментарі

Популярні публікації