Asterisk NAT <-> NAT X-Lite : OpenVPN is a solution


I have my Asterisk box behind a NAT and unfortunaltelly my SIP phone is also behind a NAT. I know this question have been discussed a lot …

Here is a solution :

I installed OpenVPN server on the Asterisk box
I installed OpenVPN on the windows client
I configured all this and … it works perfectly through the VPN.

OpenVPN is quite straightforward to install (just generate some certifcates and keys and change one config file on both sides !)
It need only one port to be open in the firewall.

OpenVPN is definitely the way to go. It avoids all the issues of dealing with NAT, it works with any type of SIP phone, it is rock-solid and proven security, and it secures 100% of the communications (voice channel and data).

Here’s an article on it: Part 1 - OpenVPN and Asterisk, Part 2, dialplans and Asterisk configuration.

Great tutorial, but the client must be a Linux, not a Windows beacause of the ip forward…, how do we do when the openvpn client is Win$ ?

It will work fine with Windows clients also. I just didn’t have one to test with. Look at the OpenVPN docs, it’s just as easy as setting it up in Linux. If I can do some tests with a Windows client I’ll put up notes on that also. I’m just not as familiar with it.

I can confirm. My client was running windows. OpenVPN can run as an application or a windows service.

Ok, and I think this will help the IP forwarding…