Answer the question
In order to leave comments, you need to log in
Wireguard VPN route setting on debian problem?
1. There are two offices
2. Each of the offices has a server
3. The server in Debian office #1 is a VPN server (Wireguard)
4. The server in Debian office #2 is connected to VPN server #1
5. In the second office the server and other devices are connected via a router.
The task is to give access to the second office to VPN. (Connecting a router to a VPN would be the easiest, but it doesn't support it). Decided to go the route of routing:
In the second office, I registered the route on the router: network 172.16.1.0 look through the server for the address 10.15.17.1
The route went through the server in the second office.
But how now to register on the server that all requests from the network with the address 172.16.1.0 are transferred to the vpn server connected to 172.16.1.1?
In the client I wrote:
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ens33 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens33 -j MASQUERADE
net.ipv4.ip_forward = 1
Answer the question
In order to leave comments, you need to log in
Not enough information to understand your network. Draw a network diagram.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question