Obtain the correct local IP of the device through OpenVPN

Hi! I have the following scenario:


Site 1	<----------------------------------------------> Site 2
			OpenVPN Tunnel
192.168.1.0/24					    192.168.30.0/24

Router on site 1 is the OpenVPN server and router on site 2 is the Client.
Devices on site 1 can be accessed without problem from site 2 and vice versa.
On site 2 there are some IP phones that connect to the PBX on site 1.

The problem is that the PBX does not show the correct IP of the phones on site 2, but instead shows the IP of the router. (see attached image)

How can I fix this? Because that way I can’t use some functions.
extensions.jpg

If at some point there’s wrong address, even though there was right one at the beginning, it means that something changed it. That thing is NAT. Another clue is what the new address is. When it’s 192.168.1.1 it most likely happened on router with that subnet. So start at site 1’s router and look for some too broad srcnat rule (with not enough conditions that would limit it only to LAN->WAN traffic, or whatever exactly you need).

Why are you so obtuse in your explanation.

Please state clearly whether or not the intent is for Phones at Site 2 to connect to the PBX (whatever that is) on Site 1 FROM:
a. public WAN to public WAN, or
b. Through the openVPN tunnel??

There is no way the IP of the router could possibly show through the wireguard tunnel unless the traffic was coming from the WANIP ( ipso facto and not the tunnel).
As Sob noted, much smarter than me, you should be either:

a. allowing the IPs from Site 2 to Site 1 through the tunnel ( expecting incoming subnet at Site 1 )
b. Potentially Source-NAT the traffic locally at Site2, that is going to the tunnel, using the OPENVPN (interface) address of Site2, so all the pbx sees is one single IP from Site 2…)

But seriously, lets not speculate,
As I intimated in the first line, obtuse without info so please provide, for both MT devices (opvn server and client)
/export (minus serial number and any actual public IP information)

@anav: I’m providing helpful hints. In fact, I’d say that this one would be good enough even for Beginner Basics section. :slight_smile: