I am contacting you because I am encountering difficulties in encapsulating a network inside a Wireguard VPN.
The Wireguard client configuration is correct and appears to be connected to the provider.
allowed ips: 0.0.0.0/0
latest handshake: 1 minute, 22 seconds ago
transfer: 125.95 KiB received, 501.52 KiB sent
persistent keepalive: every 21 seconds
However, when I try to route the machines from the 10.40.10.0/24 network into the VPN using either a routing rule or via SNAT.
set nat source rule 110 outbound-interface name ‘wg01’
set nat source rule 110 source address ‘10.40.10.0/24’
set nat source rule 110 translation address ‘masquerade’
set protocols static route 10.40.10.0/24 interface wg01
It does not work, and despite all my attempts, it remains unsuccessful. I would like to specify that I am able to route Internet to the concerned network through the following rules.
set protocols static route 0.0.0.0/0 next-hop 10.99.10.1
et nat source rule 112 outbound-interface name ‘eth0’
set nat source rule 112 source address ‘10.40.10.0/24’
set nat source rule 112 translation address ‘masquerade’
Yes, exactly. I would only the 10.40.10.0/24 network to access internet on Wireguard, while the other networks connected to the router use the default route leading to the vmbr proxmox.
I need the default route on the router so that it can connect to the public Wireguard VPN. I think it’s indeed the default route that might be causing the issue, but I’m not sure how to overcome it. I’m open to any proposition ?