Jump to content

Дмитрий Лебедев

Forum Members
  • Posts

    9
  • Joined

  • Last visited

Equipment

  • Keenetic
    Peak, Giga, Speedster, Ultra II, Giga 3

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Дмитрий Лебедев's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. Но вообще это про другое немного В конфигурации без DNS/DDNS тоже по идее должно работать, раз уж Thus, there is full IP roaming on both ends. Но не работает.
  2. Вот, что нашел в Интернете. Мы можем что-то похоже сделать? Я так понимаю это делается на клиенте, и в нашем случае будет работать только тогда, когда и клиентом и сервером выступает Кинетик? Endpoint with changing IP After resolving a server's domain, WireGuard will not check for changes in DNS again (https://lists.zx2c4.com/pipermail/wireguard/2017-November/002028.html). If the WireGuard server is frequently changing its IP-address due DHCP, Dyndns, IPv6, etc., any WireGuard client is going to lose its connection, until its endpoint is updated via something like wg set "$INTERFACE" peer "$PUBLIC_KEY" endpoint "$ENDPOINT". Also be aware, if the endpoint is ever going to change its address (for example when moving to a new provider/datacenter), just updating DNS will not be enough, so periodically running reresolve-dns might make sense on any DNS-based setup. Luckily, wireguard-tools (https://archlinux.org/packages/?name=wireguard-tools) provides an example script /usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh, that parses WG configuration files and automatically resets the endpoint address. One needs to run the /usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh /etc/wireguard/wg.conf periodically to recover from an endpoint that has changed its IP. One way of doing so is by updating all WireGuard endpoints once every thirty seconds[6] (https://git.zx2c4.com/WireGuard/tree/contrib/examples/reresolve-dns/README) via a systemd timer: /etc/systemd/system/wireguard_reresolve-dns.timer [Unit] Description=Periodically reresolve DNS of all WireGuard endpoints [Timer] OnCalendar=*:*:0/30 [Install] WantedBy=timers.target /etc/systemd/system/wireguard_reresolve-dns.service [Unit] Description=Reresolve DNS of all WireGuard endpoints Wants=network-online.target After=network-online.target [Service] Type=oneshot ExecStart=/bin/sh -c 'for i in /etc/wireguard/*.conf; do /usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh "$i"; done' Afterwards enable (https://wiki.archlinux.org/title/Enable) and start (https://wiki.archlinux.org/title/Start) wireguard_reresolve-dns.timer
  3. Нет, непохоже. Во-первых, я включал Keep alive 3 секунды в конфигурации на сервере и клиенте - не влияет на переподключение никак. Во-вторых, во время теста идёт непрерывный пинг с клиента на внутренний IP за роутером, так что туннель сам по себе держится и активен. Тут что-то другое.
  4. Добрый день. Wireguard не отрабатывает смену IP адреса сервера (при переключении между основным и резервным провайдерами), хотя должен, исходя из описания (см. ниже). Конфигурация: два провайдера, один основной, второй резервный, оба дают белые публичные IP адреса. К обоим можно подключиться через Wireguard, используя IP или привязанное к нему KeenDNS имя. Тестирование смены IP адресов у клиентов (переход с мобильного Интернет на другой Wi-Fi другого провайдера и обратно) отрабатывает без проблем, Wireguard клиент моментально переподключается вообще без видимой задержки. Тестирование смены IP адресов у сервера (роутера Кинетик) посредством смены провайдера не проходит - пакеты по туннелю перестают идти, пока не разорвешь соединение вручную, и не подключишь заново - тогда восстанавливается, и пакеты идут, как раньше. Но автоматического переключения, по аналогии с клиентами, не происходит. Читаем описание с сайта Wireguard: Built-in Roaming: The client configuration contains an initial endpoint of its single peer (the server), so that it knows where to send encrypted data before it has received encrypted data. The server configuration doesn't have any initial endpoints of its peers (the clients). This is because the server discovers the endpoint of its peers by examining from where correctly authenticated data originates. If the server itself changes its own endpoint, and sends data to the clients, the clients will discover the new server endpoint and update the configuration just the same. Both client and server send encrypted data to the most recent IP endpoint for which they authentically decrypted data. Thus, there is full IP roaming on both ends. Предполагаем, что смена IP сервера должна отрабатываться так же незаметно, как и смена IP клиента. Но этого не происходит. Нагуглил вот это обсуждение, относящееся к идентичной, кажется, проблеме с DD-WRT: https://forum.dd-wrt.com/forum/viewtopic.php?p=1221446 . Если я правильно понял, там проблема решилась только после того, как насильно соединение разрывалось и переподключалось (скрипт https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1202631#1202631 ). Но это так себе решение по ряду причин. Почему не работает IP роуминг для сервера, и куда копать? 3.6.10
×
×
  • Create New...