Public Repository

Last pushed: 3 years ago
Short Description
OpenVPN with Asterisk
Full Description

OpenVPN with Asterisk for Docker

OpenVPN and Asterisk server in a Docker container complete with an EasyRSA PKI CA.

Quick Start

  • Add $VOIP_DATA variable

  • Create volume container

      docker run --name $VOIP_DATA -v /etc/openvpn -v /etc/asterisk temrdm/voip
  • Initialize the $OVPN_DATA container that will hold the configuration files and certificates

      docker run --volumes-from $VOIP_DATA --rm temrdm/voip ovpn_genconfig -u udp://VPN.SERVERNAME.COM
      docker run --volumes-from $VOIP_DATA --rm -it temrdm/voip ovpn_initpki
  • Start OpenVPN server process

      docker run --name $VOIP_SERVER --volumes-from $VOIP_DATA -d -p 1194:1194/udp --cap-add=NET_ADMIN --restart=always temrdm/voip
  • Add asterisk client and generate a client certificate without a passphrase

      docker run --volumes-from $VOIP_DATA --rm -it temrdm/voip create_user -u 6001 -p PASS
      docker exec $VOIP_SERVER asterisk -x 'sip reload'
  • Retrieve the client configuration with embedded certificates

      docker run --volumes-from $VOIP_DATA --rm temrdm/voip ovpn_getclient 6001 > 6001.ovpn
Docker Pull Command