To configure the range of passive ports to be used by Asterisk the first thing you have to do is to connect remotely to your server by SSH.
Once you have accessed your server via SSH you will need to modify the rtp.conf file with the following command:
nano /etc/asterisk/rtp.conf
In this file we will find the following lines:
rtpstart=10000
rtpend=20000
By default Asterisk configuration opens the passive port range of 10000-20000, but we can use any range between 40000-65534 modifying the previous lines.
We will keep the default range for this example.
If you modify the port range you will have to restart the Asterisk service, you can do it with the following command:
systemctl restart asterisk
Configure ports in your Firewall
Once you have your port range defined in the rtp.conf file you will need to open this port range in your firewall profile:
In the image I open the port range 10000-20000 as it is the default port range, you have to open the port range you have defined in the rtp.conf file, once the port range is open you will be able to use Asterisk with passive ports.
We hope we have helped you with this article! 🙂 Remember, if you have any questions about this or any other issue related to your Clouding servers, do not hesitate to contact us at soporte@clouding.io We are at your side for whatever you need!