N
N
nihi1ist2021-01-17 15:22:37
VPN
nihi1ist, 2021-01-17 15:22:37

How to redirect website traffic through Wireguard?

"My State of Kazakhstan" blocked the fucking site with additions, and the synchronization also does not work. Let's say I want to route traffic from addons.mozilla.org through a newly configured Wireguard. Local network: 192.168.1.11-254/24, VPN network: 172.16.8.11-254. addons.mozilla.org IP addresses: 44.239.254.46, 44.232.62.131, 52.35.164.186. Here is an example of settings files:

Server configuration
[Interface]
PrivateKey = <Приватный ключ сервера>
Address = 172.16.8.1/24
SaveConfig = false
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o wg0 -j MASQUERADE
ListenPort = 51820

[Peer]
# Home computer
PublicKey = <Публичный ключ клиента>
AllowedIPs = 172.16.8.0/24, 192.168.88.0/24
Endpoint = <IP-адрес сервера с Wireguard>:51820
PersistentKeepalive = 20

Client Configuration
[Interface]
PrivateKey = <Приватный ключ клиента>
Address = 172.16.8.15

[Peer]
PublicKey = <Публичный ключ сервера>
Endpoint = <IP-адрес сервера с Wireguard>:51820
AllowedIPs = 172.16.8.0/24, 192.168.1.0/24
PersistentKeepalive = 20

Tell me why it doesn't work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-01-17
@ky0

Allowed IP on the client - these are the ranges that will go to the tunnel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question