[asterisk-users] Two Asterisks behind NAT and need to link them using IAX trunk

Chris Bennett chris at cgb1911.mine.nu
Sat Jan 19 02:11:31 CST 2008


Hi Bilal,

> How can I use SSH in that senario? Is there a link
> that can help to understand what I have to install and
> to configure?

I don't think SSH is a recommended approach.  You can't run an IAX2
trunk over SSH (IAX2 used UDP and SSH only supports TCP port
forwarding.

http://www.securityfocus.com/infocus/1816 documents TCP port
forwarding over SSH.  As above in this thread have a suggested, you'll
need to implement OpenVPN (TCP tunnel) over SSH in order to establish
an IAX2 trunk.

It is much simpler to just use  OpenVPN and forget about SSH
altogether.  The additional overhead in an IAX2 over OpenVPN over SSH,
coupled with the use of TCP for the SSH and OpenVPN tunnels, will
cause more problems with voice quality.

The documentation on openvpn.net is excellent.  Try
http://openvpn.net/static.html for quick guide using static pre-shared
keys.

Installation of openvpn on your Linux distribution should be a simple
as:
  Ubuntu/Debian: apt-get install openvpn
  Redhat based:  http://dag.wieers.com/packages/openvpn will give you
                 an RPM
  Gentoo: emerge openvpn
  Others: use tarball and compile, or find appropriate package

Good luck and feel free to email back if you have troubles.

Regards,

Chris Bennett



More information about the asterisk-users mailing list