If the PBX is not behind NAT then you will not be able to setup the gateway.
The PBX must have a local ip address so what you may do is to add a 2nd NIC on the PBX with a private ip address and not a default gateway. Then you must setup the VPN between the remote site and the PBX.
Keep in mind that this must be done during the installation of the PBX and the 2nd NIC can not be added on the fly.
So during the installation you will select the one which does not have the default gateway so the provisioning links for the Local LAN extensions, will have the link of the NIC
without the gateway so they will be able to connect.
Now after the installation, on the Management Console >> Settings >> Network>> Select Network Card Interface >> Public ip tab go and change the NIC and choose the one that has the gateway so the remote extensions will be
able to connect. The Tunnel ip address will also update automatically.
Then restart all the services of the PBX.
Check also 3cx Academy slide 11 here :
https://www.3cx.com/3cxacademy/videos/intermediate/advanced-installation/
Also check Supported network installations :
https://www.3cx.com/blog/docs/network-configurations-supported-3cx-phone-system/
The reason behind this is that if the PBX has a full public ip address only, then it assumes that its on the cloud and it can accept only remote registrations for extensions and no local.
If you have any further questions, let us know.