Jump to content

Recommended Posts

Posted

Добрый день.

На сервере (Debian 10) с белым IP настроен Wireguard:

[Interface]
Address = 10.8.0.1/24
ListenPort = 54321
PrivateKey = _______________________________
PostUp = sysctl -w -q net.ipv4.ip_forward=1
PostUp = iptables -P FORWARD DROP
PostUp = iptables -I FORWARD -i %i -o %i -s 10.8.0.0/24 -d 10.8.0.0/24 -j ACCEPT
PostDown = sysctl -w -q net.ipv4.ip_forward=0
PostDown = iptables -P FORWARD ACCEPT
PostDown = iptables -D FORWARD -i %i -o %i -s 10.8.0.0/24 -d 10.8.0.0/24 -j ACCEPT

[Peer]
PublicKey = _______________________________
AllowedIPs = 10.8.0.2/32


На роутере Kennetic поднят Wireguard (10.8.0.2), настроен и сети видят друг друга через подсеть 10.8.0.0 (всё работает отлично). К этому же роутеру подключены устройства (подсеть 192.168.1.0).

Подскажите, пожалуйста, как заставить сервер 10.8.0.1 видеть подсеть 192.168.1.0 с устройствами, подключенными к Keenetic?

Posted
2 часа назад, uin2u сказал:

Подскажите, пожалуйста, как заставить сервер 10.8.0.1 видеть подсеть 192.168.1.0 с устройствами, подключенными к Keenetic?

Дописать peer'у в AllowedIPs = 10.8.0.2/32, 192.168.1.0/24  Добавить на сервере маршрут до сети 192.168.1.0/24 через 10.8.0.2 (По идее не понадобится, если вы поднимаете wg с помощью wg-quick, тогда маршрут будет добавляться сам, при наличии сети 192.168.1.0/24 в списке allowed ips) Если на кинетике не меняли secirity-level и он для интерфейса Wireguard у вас public, то добавить разрешающие правила межсетевого экрана для интерфейса Wireguard для входящих.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies. By clicking "I accept" or continuing to browse the site, you authorize their use in accordance with the Privacy Policy.