OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: baz on October 20, 2022, 02:26:50 AM

Title: Should Wireguard tunnel address be the same on both sides of a peer-to-peer vpn?
Post by: baz on October 20, 2022, 02:26:50 AM
I am trying to setup a peer-to-peer wireguard vpn connection between two sites. On the "local" tab of the first peer I set the tunnel address range to 172.16.2.0/24 and the port to 51820. Should I use the same values on the "local" tab of the second peer, or do I need to use precisely NOT those values and something like 172.16.3.0/24 and port 51821, for example (different IP and port)?
Title: Re: Should Wireguard tunnel address be the same on both sides of a peer-to-peer vpn?
Post by: bartjsmit on October 20, 2022, 07:22:16 AM
They are subnet addresses and both routers need to agree on the address of the network between them. Assign 172.16.2.0/24 on both sides with different interface IP's (e.g. 172.16.2.1 on one end and 172.16.2.2 on the other).

The ports are on the outside of the tunnel and are tied to the public IP's of your VPN. They have no meaning inside the tunnel.

Bart...