Asterisk Server behind VPN


So I’ve recently setup a FreePBX Installation and was happy to get it working on my local network. However, I wanted to be able to make calls to the network even from outside of the network (broader Internet) and this is where things get very weird.

Okay so before that, I want to be clear with my goal:
I (or any other SIP client) want to be able sign in and call any other SIP client within or outside the local network.

The local network where the FreePBX server is in is behind at least a double NAT, connected to ISP (so the IP is dynamic and I cannot port forward anything on it). I however have access to a cloud server that mainly serves as my public static IP from my servers, where it forwards all the ports I need through a VPN tunnel to whatever server.

I have forwarded port 5060 UDP and TCP, and also a port range of 10000-12000 UDP from the cloud server to the FreePBX server through the VPN tunnel.
Here’s the problem: I am able to sign in any sip client using TCP (from outside the network) but not UDP. In fact UDP never works and since RTP requires UDP, I can never make a call from outside the network.
Here’s a network diagram to make things clear:

I have tried everything with the firewall even turning it off but it did not solve anything. I also tried messing with SIP configs but I wasn’t able to get it to work. I tried searching for people with the same problem but I cannot seem to find someone with a solution that I was able to do.

I would really appreciate your help. Thanks in advance!

I would suggest you put your PBX on your ‘cloud server’ and save yourself problems with nat and routing

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.